Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 8th, 2005, 11:22 PM
Registered User
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default java applet trick convet to c#

hi all,

im a c# developer 'n new to java applets,

my client have a server and a web java applet that connects to server using socket

i've got a task to create a c# windows application to do same as the applet.
im just confused, when i saw the applet code, it connects to server, and sends itself to the server!!!

here's the code, can anyone plz help me what's actually happening...

                    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);
                catch(Exception exception)
                    txtAreaMessages.appendText("Could not Connect...");
                // THIS IS THE CODE WHERE IM CONFUSED!!!
                ClientNew clientnew = new ClientNew(is, os, txtAreaMessages);
                ch_thread = new Thread(this, "abc");
alll is well, but what's with ObjectOutputStream, and why its sending (this) to server??

im asking this question here because i wanna learn it as well :D

it'll be really great help if someone can tell me same to do in c#
i cannot do anthing with the server, i've to convert this to c#


// chall3ng3r //

you cannot change th truth,
but truth can change you
- unknown

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Applet - Search with Slider options itHighway Classic ASP Basics 0 June 10th, 2006 02:49 AM
close java applet causes browser to crash Thomanji Ajax 0 February 24th, 2006 10:25 AM
display element (layer) over java applet mateenmohd Java GUI 0 January 6th, 2004 12:39 AM
Java Applet that can read an XML file sankar J2EE 1 December 25th, 2003 05:40 AM
Plotting a graph on a Java Applet cooldude87801 BOOK: Beginning Java 2 1 June 12th, 2003 08:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.