Esempio n. 1
0
 /// <summary>
 /// Receive socket messages asynchronously.
 /// </summary>
 private void SocketMessageReceive()
 {
     var mobj = new PirateMessageObj(this);
     Socket.BeginReceive(
             mobj.Buffer,
             0,
             mobj.Buffer.Length,
             SocketFlags.None,
             SocketMessageReceived,
             mobj
     );
 }
Esempio n. 2
0
 /// <summary>
 /// Start receiving messages from a client.
 /// </summary>
 /// <param name="pclient">The client to receive messages from.</param>
 private void SocketMessageReceive(PirateClient pclient)
 {
     Contract.Requires(pclient != null);
     var mobj = new PirateMessageObj(pclient);
     pclient.Socket.BeginReceive(
             mobj.Buffer,
             0,
             mobj.Buffer.Length,
             SocketFlags.None,
             SocketMessageReceived,
             mobj
     );
 }
 public PirateMessageObj Constructor01(PirateClient client, PirateMessage msg)
 {
     PirateMessageObj target = new PirateMessageObj(client, msg);
     return target;
     // TODO: add assertions to method PirateMessageObjTest.Constructor01(PirateClient, PirateMessage)
 }