tags:

views:

858

answers:

1

I'm looking for a good tutorial on tcp socket programming in Java.

The emphasis is on Good here, often I find that when I lookup this kind of guide I get halfway through before realising that either the person who has written the guide doesn't know what they are talking about or can't express what they know in a way that is condusive to knowledge transfer.

Either that of there are 12 pages of "What are sockets about" and one page of here is some code that uses sockets.

alternatively if somone wants to write out code snippets for sending text over a TCP socket and waiting for messages on a port that would work too. It's been 5 years since I did any socket programming and that was in c under embedded linux, and my memory isn't what it used to be... :(

+4  A: 

Does this help at all? http://java.sun.com/docs/books/tutorial/networking/sockets/. It's sun's own sockets tutorial. It has a "what are sockets" part, a "writing to / reading from sockets" section and finally a "read / write pair" simple example as you were asking about.

The waffle:code ratio seems pretty decent.

xan