O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending Objects Across the Network Using Sockets

You saw earlier how easy it is to create a client Socket and a ServerSocket and then send data between the two using sockets. What about sending objects between the two using sockets? Can it be done? Fortunately, it can, and it's almost as easy as sending primitive data. There is one thing that hasn't been discussed yet and that's an application rotocol.

An application protocol is the understood messaging structure that goes on between the client and server sides. From the server side standpoint, the client can send all the data that it wants, but unless the server knows what to do with it ahead of time, the act is pretty much meaningless. There has to be an agreed upon structure in the communication. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required