Hacker News new | ask | show | jobs
by spintin 885 days ago
So how do you implement a TCP socket?

I have always had to do synchronized(something) { socketInputStream.read(); }

And the dude himself says that reading from a socket is a problem if you listen to the interview.

1 comments

Something tells me you don't know much about programming in Java. Just look up any tutorial showing how to use NIO (blocking and non-blocking).

Synchronized in this context is pretty nonsensical.