Hi,
please... the application that opens the connection is a CLIENT.
What do you use to browse the Internet (i.e., your Internet Browser), a server or a client ?
A client.
And who's starting the connection, the browser or the Web Server ?
The browser.
And why the Web Server is named a Server ?
Because it's a server, it's waiting there for a TCP connection.
The clients usually use random ports, and that's what OnOffApplication is doing.
About an example... you have OnOffApplication, what's wrong with it ? It's a perfect example (of a client).
About a server (a real one), PacketSink is a server. Again, it's a good example.
Have fun,
T.