public void JsonTest3() { ClientSocket cs = new ClientSocket(); Socket s = cs.ConnectToServer(); JsonBytes jb = new JsonBytes(s); try { jb.Recived += PrintObject; } catch (Exception) { } DataClassTrans d1 = new DataClassTrans("test1"); DataClassTrans d2 = new DataClassTrans("test2"); DataClassTrans d3 = new DataClassTrans("test3"); DataClassTrans d4 = new DataClassTrans("test4"); jb.Send(d1); Thread.Sleep(50); jb.Send(d2); Thread.Sleep(50); jb.Send(d3); Thread.Sleep(50); jb.Send(d4); }
public void JsonTest() { ServerSocketOne sso = new ServerSocketOne(); Socket s = sso.StartHost(); JsonBytes jb = new JsonBytes(s); try { jb.Recived += PrintObject; } catch (Exception) { } }
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 JsonTest() { ClientSocket cs = new ClientSocket(); Socket s = cs.ConnectToServer(); JsonBytes jb = new JsonBytes(s); DataClassTrans d1 = new DataClassTrans("test1"); DataClassTrans d2 = new DataClassTrans("test2"); DataClassTrans d3 = new DataClassTrans("test3"); DataClassTrans d4 = new DataClassTrans("test4"); jb.Send(d1); Thread.Sleep(50); jb.Send(d2); Thread.Sleep(50); jb.Send(d3); Thread.Sleep(50); jb.Send(d4); }
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); } }