public void JsonTest1() { ServerSocketListen ssl = new ServerSocketListen(); Socket s = ssl.StartHost(); JsonBytes jb = new JsonBytes(s.Accept()); try { jb.Recived += PrintObject; } catch (Exception) { } }
public void ClientHandlerSerialTest2() { ServerSocketListen ssl = new ServerSocketListen(); Socket s = ssl.StartHost(); ClientHandler ch = new ClientHandler(s, true, true); new Thread(ch.AcceptClientsSerialBytes).Start(); try { ch.Recived += PrintObject; } catch (Exception) { } }
public void JsonTest2() { List <JsonBytes> listJB = new List <JsonBytes>(); ServerSocketListen ssl = new ServerSocketListen(); Socket s = ssl.StartHost(); while (true) { JsonBytes jb = new JsonBytes(s.Accept()); try { jb.Recived += PrintObject; } catch (Exception) { } listJB.Add(jb); } }
public void JsonTest3() { List <JsonBytes> listJB = new List <JsonBytes>(); ServerSocketListen ssl = new ServerSocketListen(); Socket s = ssl.StartHost(); for (int i = 0; i < 3; i++) { JsonBytes jb = new JsonBytes(s.Accept()); try { jb.Recived += PrintObject; } catch (Exception) { } listJB.Add(jb); } foreach (var item in listJB) { DataClassTrans d1 = new DataClassTrans("server1"); item.Send(d1); } }