May 21, 2011
Simple TCP Messages with NetSocket
Update: The NetSocket library has been tested in mono. Now you can use it to communicate between Windows, OS X and Linux.
Back in the days before .Net it was easy to add network messaging with the Winsock Control. Unfortunately .Net does not include an out-of-the box messaging API. Thankfully it has everything you need to make one.
There are many other projects that re-implement the old Winsock API, but using a VB4 API just never felt very dot-net. NetSocket is a simple library for transmitting binary messages between networked .Net apps. It uses standard dot-net conventions and has no additional dependancies.
See the NetSocket code on GitHub.
Note: NetSocket is not designed to be compatible with
Winsock or and other messaging protocol. The header format is
easy to change so feel free to rewrite it. It could be updated to
support any protocol with the message byte-length in the header.
The project includes a pair of demo applications and code that show how the library works.