Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect with a Java Server

Status
Not open for further replies.

HippoTas

Programmer
Dec 4, 2001
15
GR
Hi! I want to have a client which connects with a server written in Java. In details :
I want to send a string like : <request>command</request> and I want to receive the response which is of the type : <response>answer</response>

I know that the Java server uses the function readline to read from the socket and the function writeline to write there.
In my implementation i use a CSocket, a CSocketFile and two CArchive. The function connect succeeds and I can see that and in the log file of the Java server.

BUT : archive_out << strRequest; doesn't do anything!! :(

can anybody plzzz help me with that? I haven't written ever before implementation in order to connect my VC++ client with a server created with JAVA and I don't know if there is anything special with it.
 
I having a same problem right now, may i know what do you use in your java server side first? i'm using bufferedreader for reading the inputs and printwriter for sending the message. how about you?
 
I suggest you guys use plain CSocket::Send() and Receive() with simple strings first during debug. Also, tell me do you have the source for the Java Server?

/Srikanth In the sweat of thy brow shall you eat your bread.
-Bible

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top