Exemple #1
0
 public Action <Action <int>, Action <Exception> > Read(byte[] buffer, int offset, int count)
 {
     return(Continuation.FromAsync <int>(
                (c, s) => socket.BeginReceive(buffer, offset, count, SocketFlags.None, c, s),
                socket.EndSend));
 }
Exemple #2
0
 public Action <Action, Action <Exception> > WriteFile(string file)
 {
     return(Continuation.FromAsync(
                (c, s) => socket.BeginSendFile(file, c, s),
                iasr => { socket.EndSendFile(iasr); }));
 }