The SNL (Simple Networking Library) is designed to be extremely fast and efficient at communicating over the TCP Protocol using Binary Serialization. The system itself manages most of the resources, leaving you (the programmer) with a few areas you can hook into (such as events) to determine what your program needs to do.
Inside the Networking.VB file, you will find two different regions:
P2P Client/Server Example
Generics, Structures and Exceptions
The P2P region speaks for itself, serving as an example for how to use the system as a Peer-to-Peer like system for communicating using Binary Serialization.
The Generics, Structures and Exceptions region contains all the classes and structures for SNL to work.
Also included is an example application that uses the Peer to Peer Classes so you can see it in action.
At the head of the Networking.VB file, there is a rather large comment section that explains in detail every structure and class file currently in the file.
Any questions, comments, or criticism welcome!
Changelog:
February 12th, 2011
Version 1, Revision 4 uploaded.
Networking Example uploaded.
Last edited by formlesstree4; Feb 12th, 2011 at 03:44 PM.
Reason: Redesigning the entire page and new release
Update: 6/18/2010
Added several bugfixes as well as fixing a few security holes. Groups also have an IRC-style permission system. More information will be posted later after I get some sleep.
Update: 6/28/2010
Created the TCPClientv2 class. It will handle whatever is necessary from the TCPserver class here. It should be pretty bug free, but if not, please let me know so I can fix it. It is commented for everyone, so hopefully there won't be much confusion.
Last edited by formlesstree4; Jun 28th, 2010 at 02:42 AM.
Reason: I started working on the 27th, but it became the 28th when I posted o.o
Update: 6/30/2010
Man, I completely screwed up the .SendMessage() Sub. It didn't even actually send the message . I also fixed a few bugs with the Login & Registration not working if you failed once. Now it should work just fine. Feedback is welcome.
Well, I did a lot of things. I cleaned up some code in TCPV2.vb as well as TcpClient.vb, but I did a bit more than that too. The TCPV2 now includes a type of Queue system for storing messages sent to an offline person, as well as friend requests. The queue is processed whenever a user logs in and they are checked for items saved in their name. It was messy to debug, but it works now.
It also will allow you to remove friends even if someone is offline, and it won't force sync them either (which caused some problems). Instead, until the other person re-adds them, it won't show them online. Think of it as a permanent blocking mechanism.
The Client Class was also adjusted as to what gets error handled now. Thread Aborts are ignored (not necessary), and disconnecting clients are handled better to the point where it won't (stupidly) keep blank users connected. It improved the clientside as well.
Speaking of which, on the Client side, there were a few new subs added (to simplify tasks), and some others streamlined, but that's about it. Leave some responses if you would please as to how it's working for people (Bug reports accepted here and also by PM).
Update: 7/20/2010
Well I had a blast fixing this thing up. I redid the TCPV2 class's events somewhat to act like the framework, using the ByVal sender As Object, ByVal e As SomeDataArgs signature for every event. Since the server only had like....5 or so events, that wasn't a big deal. The TcpClient however is going to be much harder to do since it has 15 events to format like that
No real updates done to TcpClient yet, but I'll still upload it with the latest version I have.
I have uploaded the Simple Networking Library, which is an entire rewrite of the system, making it more generic and simplistic, allowing other people to write their own classes that utilize the lower level communication systems as well as an example application that shows message based communication on a Peer to Peer level.
Before you ask any questions, read all the comments in the code.