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(); }
static void InitSocket() { SocketServer server = new SocketServer(3030); server.Start(); }