This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Dear friends I am trying to make chat server application but I am facing problem � How can pass a user name(string) to server . I made a client socket with make a TCP/IP connection to server using Socket s=new socket(host , port); Actually my aim is to broadcast username to all user who currently login..Means as user login message will be display on the screen like �Denial has joined Room� here Denial is user name it may be differ .. Another thing is that I want to online user list in to applet that is only possible when I get username when new client connect to server. I tried all the client socket option��plz help its urgent �. Thnx in advance � Deep
theSocket=new Socket(e.inet,thePort); in=new BufferedReader(new InputStreamReader(theSocket.getInputStream())); out=new PrintWriter(new OutputStreamWriter(theSocket.getOutputStream()),true) create input and oupput stream like this and then get ur username from textfield like uname=tf1.getText(); and then send it to server with some initial string before it so server can understand that it is username like and get username from tht i think this much is enough. out.println("#"+uname); thanks 4 thanks