diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Messaging/Client/Sockets/StateObject.cs	Wed Mar 21 15:39:53 2012 +0000
@@ -0,0 +1,21 @@
+using System.Net.Sockets;
+using System.Text;
+
+namespace Client.Sockets
+{
+    // State object for receiving data from remote device.
+    public class StateObject
+    {
+        // Size of receive buffer
+        public const int BufferSize = 256;
+
+        // Receive buffer
+        public byte[] Buffer = new byte[BufferSize];
+
+        // Received data string
+        public StringBuilder Sb = new StringBuilder();
+
+        // Client socket
+        public Socket WorkSocket;
+    }
+}