l l
l l

Reputation: 21

Socket Connection between JAVA Client and Node Server

I'm trying do a connection between java client and node server but my client wait a message with readUTF() (JAVA) and trying send a message with socket.write (Node) how to convert my message to UTF? or how to send without modified my client?

Upvotes: 0

Views: 360

Answers (1)

user207421
user207421

Reputation: 311028

You can't use readUTF() unless the sender is using writeUTF().

Use something else: lines; length-word prefix; type-length-value protocol; XML; JSON;

Upvotes: 1

Related Questions