public Listener(int port, AcceptProc acceptProc, object acceptParam, bool localOnly = false, bool getHostName = false) { this.lockObj = new object(); this.Port = port; this.AcceptProc = acceptProc; this.AcceptParam = acceptParam; this.Status = ListenerStatus.Trying; this.eventObj = new Event(); this.halt = false; this.LocalOnly = localOnly; this.GetHostName = getHostName; this.ListenRetryTime = ListenRetryTimeDefault; // スレッドの作成 ThreadObj thread = new ThreadObj(new ThreadProc(ListenerThread)); thread.WaitForInit(); }
// TCP 受付完了 void tcpAccepted(Sock s) { ThreadObj t = new ThreadObj(new ThreadProc(tcpAcceptedThread), s); t.WaitForInit(); }