expert's help needed with networking URGENT!!!
im trying to convert this java applet code to c#.
to_server = new Socket(getCodeBase().getHost(), port_of_server);
_OOS = new ObjectOutputStream(to_server.getOutputStream());
is = new DataInputStream(new BufferedInputStream(to_server.getInputStream()));
os = new PrintStream(new BufferedOutputStream(to_server.getOutputStream(), 1024), false);
txtAreaMessages.appendText("Could not Connect...");
_OOS.writeObject(this); //<<< im
ClientNew clientnew = new ClientNew(is, os, txtAreaMessages);
ch_thread = new Thread(this, "abc");
im stuck with this line of code:
what does it do?? and how i can perform the same in c#, bcoz server is same. i only need to convert the client into .net windows app.
thanks in adv.
waiting for a quick +ve reply soon.
// chall3ng3r //
That line writes an object to a stream. The object must implement Serializable so that the output stream can transform it's fields into something that can be transported. I don't know C# so I don't know if there's anything analagous. Take a look at the Sun tutorial which will explain it a lot better than me...
thanks, i'll take a look at it.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL