Ejemplo n.º 1
0
Task x(){return Task.Run(()=>v.WaitOne());}private void y(IAsyncResult a,a5 b){
try{var c=(string)a.AsyncState;var d=b.EndReceive(a);if(d==1&&s[0]==0xAA){u=c;v.
Set();}}catch(Exception e){M.WriteLine("Handshake EndReceive failed");M.
Exception(e);}}}class a0{private const string o=
Ejemplo n.º 2
0
IDisposable)b.Object).Dispose();b=new a7(t);b.BeginReceive(B,b);}}private void C
(IAsyncResult a){try{var b=(int)a.AsyncState;var c=v.EndReceive(a);M.WriteLine(
"Listener received a message ("+c+")");if(c==0){M.WriteLine(
"Connection to the server has ended");z(u);return;}p.Feed(q,c);A(v,0);}catch(
Exception e){M.WriteLine("EndReceive failed");M.Exception(e);z(u);}}private void