I might as well archive the project and attach it :laugh: But anyways. I don't mind:)private System.Byte[] buffer=new Byte[1024]; private void SetupReceiveCallback(Socket _sock) { AsyncCallback receive=new AsyncCallback(OnReceive); _sock.BeginReceive(buffer,0,buffer.Length,SocketFlags.None,receive,_sock); } private void OnReceive(IAsyncResult result) { try { Socket _sock=(Socket)result.AsyncState; int stop=_sock.EndReceive(result); String str=System.Text.Encoding.ASCII.GetString(buffer,0,stop); MessageBox.Show(str); process(buffer,stop); SetupReceiveCallback(_sock); } catch { MessageBox.Show("Out"); this.Close(); } }
So? :laugh: