private void toolStripButton4_Click(object sender, EventArgs e) { listener = new AsySocket(); listener.OnAccept += new AcceptEventHandler(listener_OnAccept); listener.Listen(10); toolStripButton4.Enabled = false; }
void listener_OnAccept(AsySocket AcceptedSocket) { //ע���¼� AcceptedSocket.OnStringDataAccept += new StringDataAcceptHandler(AcceptedSocket_OnStringDataAccept); AcceptedSocket.OnClosed += new AsySocketClosedEventHandler(AcceptedSocket_OnClosed); AcceptedSocket.BeginAcceptData(); //���� //listBox1.Items.Add(AcceptedSocket.ID); clients.Add(AcceptedSocket.ID, AcceptedSocket); }