This is a small example that shows how to properly set up a TCP server to handle and buffer transmissions(the data) solely with byte arrays.
Also, listening/accepting is properly set-up, and it even reuses sockets when they're no longer in use.
The MS Winsock control is used for sockets, and the default listen port is 1000.
Enjoy. :)
