Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java socket  RSS feed

 
Abebe Belew
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing a java client socket to communicate to C server socket.
The c programme is expecting three parameters sent by client
ie) (type of the parameter, string to be read, length of the string). Is there any way I can write this params. to the socket?
 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The soket has the OutputStream (soket.getOutputStream )
You can compile your message into byte[] buffer and flush to the stream.

Does that help?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!