Example #1
0
        public SocketClient(SocketServer server, Socket client)
        {
            this.server = server;
            this.client = client;
            this.da = new DataAccess();
            this.user = new User();
            this.dataReceived = 0;

            userSerializer = new DataContractJsonSerializer(typeof(User));
            messageSerializer = new DataContractJsonSerializer(typeof(Message));
            stream = new MemoryStream();

            Thread thread = new Thread(StartReceivingData);
            thread.Start();
        }
Example #2
0
 static void InitSocket()
 {
     SocketServer server = new SocketServer(3030);
     server.Start();
 }