using using using using using using using
system; system.collections.generic; system.text; system.net; system.net.sockets; system.io; system.runtime.serialization.formatters.soap;
namespace snakechat { class program { static void main(string[] args) { ipaddress ip = ipaddress.parse("10.103.61.120"); tcplistener listener = new tcplistener(ip, 4000); listener.start(); tcpclient c = listener.accepttcpclient(); networkstream s = c.getstream(); messagelogic.messagelist ml; soapformatter formatter = new soapformatter(); ml = (messagelogic.messagelist) formatter.deserialize(s); s.close(); c.close(); // console.writeline(); c = new tcpclient(); c.connect("10.103.60.21", 4000); s = c.getstream(); ml.add(new messagelogic.message("www.davidstern.co.il", "david stern"));
} }
}
formatter.serialize(s, ml); s.close(); c.close();