Results 1 to 5 of 5
- 09-26-2011, 06:51 PM #1
Member
- Join Date
- Sep 2011
- Posts
- 37
- Rep Power
- 0
java server client socket sending and reading data HELP!
Hello there i need help im making a mmorpg and i want to use sockets to send data to and from the client to my server so for example:
username is sent from client to server
server validates username then sends x and y location data
i was thinking of using POST or GET type things like you do on html or PHP but have no idea how to do this on java also i am new to java sockets and if any one has some code on how to do the sending of data through sockets can u please post :)
- 09-27-2011, 08:13 AM #2
Re: java server client socket sending and reading data HELP!
)) Just read about sockets protocols and http protocol. You will understand what you want to do. ) Because now you just don't understand what sockets is and http is. ))
Regard.Skype: petrarsentev
http://TrackStudio.com
- 09-28-2011, 06:20 PM #3
Member
- Join Date
- Sep 2011
- Posts
- 37
- Rep Power
- 0
Re: java server client socket sending and reading data HELP!
ok so i have made some code for the socket data will be sent like this "cmd=login,user=uname,pass=pwd" i know how to split the "," in the string but i am trying to split the "=" using this code:
String[] msg = clientCommand.split(",");
String temp_cmd1 = msg[0];
String[] temp_cmd2 = temp_cmd1.split("=");
String cmd = temp_cmd2[0];
- 09-29-2011, 09:56 AM #4
Re: java server client socket sending and reading data HELP!
You must do some code, which we can run. Can you tell what is clientCommand and what value does it have?
Skype: petrarsentev
http://TrackStudio.com
- 09-29-2011, 01:17 PM #5
Member
- Join Date
- Sep 2011
- Posts
- 37
- Rep Power
- 0
Similar Threads
-
Java Socket server with C client problem
By rnvrnv in forum NetworkingReplies: 6Last Post: 11-09-2010, 12:47 AM -
Simple Socket program: Java Client- C server
By pimmling in forum New To JavaReplies: 1Last Post: 11-08-2010, 01:27 PM -
sending file from client to server - socket closed error
By forex in forum NetworkingReplies: 3Last Post: 04-05-2010, 02:19 AM -
java.io.EOFException: send vector from client to server through socket
By kathychow in forum New To JavaReplies: 0Last Post: 04-05-2009, 03:59 PM -
Sending a .Doc file from client to a server through socket
By amita_k29 in forum NetworkingReplies: 1Last Post: 02-10-2009, 09:16 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks