annotate Messaging/Client/Sockets/StateObject.cs @ 26:045dac571339

Working on data binding to a user control
author adminsh@apollo
date Wed, 21 Mar 2012 15:39:53 +0000
parents
children
rev   line source
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
1 using System.Net.Sockets;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
2 using System.Text;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
3
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
4 namespace Client.Sockets
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
5 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
6 // State object for receiving data from remote device.
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
7 public class StateObject
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
8 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
9 // Size of receive buffer
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
10 public const int BufferSize = 256;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
11
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
12 // Receive buffer
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
13 public byte[] Buffer = new byte[BufferSize];
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
14
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
15 // Received data string
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
16 public StringBuilder Sb = new StringBuilder();
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
17
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
18 // Client socket
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
19 public Socket WorkSocket;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
20 }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
21 }