Click here to Skip to main content
13,192,426 members (51,739 online)
Click here to Skip to main content
Add your own
alternative version


98 bookmarked
Posted 23 Jan 2005

TCP/IP With VB.Net - version 2(more power-more ease)

, 1 Jun 2005
Rate this:
Please Sign up or sign in to vote.
Exposes one of the most easy to use .net assembly for giving TCP/IP functionalities to any .Net environment

Sample screenshot


Here it is. (Thanks to <- uno sh4re -> for coding sh*t)
Finally UnoLibs.Net V2 is done, and special Example app is made for CodeProject.
Remember this sh*t is released under GNU LGPL, this means you can use it for
whatever, including commercial.

1.UnoLibs.Net.dll / What is it?

UnoLibs.Net.dll is one of most easy to use library for giving TCP/IP functionalities to your .net app.

No need of namespace( means you can use it for interfaceless application such as a .net console application )
What you get is a small set(3) or highly cusomizable classes wich can be used with ease, including a multithreaded server.

C# Programmers can use this library as well as users, usage steps are the same and the code needed is very easy to intend for using in c#.
(C# documentation would come in some time if some ask)

It exposes 3 Classes just made for being easy:ServerClass, ClientClass, ServerScanner.
The Article Shows one usage of theese classes, as they are implemented in the Example Application code.

2.What will i find in the Downloads?

-ExampleApp.Zip :This one contains the compiled versione of the example
                        You can download this, execute and and try it on your
                        localIP (loopback connection), or also you can install
                        it in more computer and test it over a network.  : This one contains a compiled version of the library and a
                         VS.NET solution specially made for CodeProject.
                         The solution is made of 2 projects:
                          -Example App
                          Of course Example App references to UnoLibs.Net

Both Also contains EvID4226Patch.exe wich let u modify the max number of simultaneous halfopened connection wich is limited to 15 in many new Os (2000/XP/2003), this is required in order to get the scanner working with more than 15 threads :).

3.How do i use this?

To use UnoLibs.Net, just follow 3 easy steps
  1 Download any of the avaiable downloads and get UnoLibs.dll out of the zip file
  2 In Visual Studio, Add the reference to UnoLibs.dll
  Your project can now use the classes exposed by the assembly.
  3 Have fun using the classes with ease.

The usage is very easy and the references should be chomprensive of any important
information, however i'll write here topic usage for all of the 3 classes exposed.


Please note that this page shows (in the code snippets) ALL of the code
needed for getting the class to work and use them, no more code is needed.

ClientClass Usage

Create the ClientClass Instance

Dim Client As New UNOLibs.Net.ClientClass

Sending messages(bytes/data) to any server on specified IP/PORT is very easy.

Client.SendMessage(IP, PORT, DATA)

Sending files to specified IP/PORT is very easy.

Client.SendFiles(IP, PORT, dialog.FileNames)

That's it for the client!!!

ServerClass Usage

Create the ServerClass Instance (Withevents is specified for using "handles" clause later)

Dim WithEvents Server As UNOLibs.Net.ServerClass

Initialize the server on specified PORT(auto retrieves local IP) is very easy, using true will autostart the server and "C:\" is the Path for saving incoming files.

Server = New UNOLibs.Net.ServerClass(PORT, True, "C:\")

Now you need to catch Incoming Messages from IPs, easily do this with a sub
that handles the incoming message event of the ServerClass.

Private Sub OnIncomingMessage(ByVal Args As UNOLibs.Net.ServerClass.InMessEvArgs)Handles Server.IncomingMessage
        'sender IP
        Dim sip As String = Args.senderIP
        Dim DATA As String = Args.message
        'And you stuff here
        'If DATA.equals(........
End Sub

Note here that you can implement a similar handles sub also for capturing Diagnostics Messages for example to know when a file transfer session begins or ends(see the exampleapp code for more infos)

Changing the path for incoming file is easy.

Server.IncomingPath = "C:\Incoming Files"

That's it for the server.

ServerScanner Usage

Create the instance of ServerScanner

Dim WithEvents Scanner As UNOLibs.Net.ServerScanner

What to do when IPs are found on the specified PORT?
most probably something like that.

Private Sub OnIPFound(ByVal IP As String) Handles Scanner.IPfound
End Sub

Hmmmm let's start the scan


That's It for the ServerScanner

NOTE on ServerScanner : If you are interested in catching perform bar step and scan finished events please refer to the very easy Example APP code.

5.Interesting Part

  -With a couple of lines of code you get a multithreaded server that will start
   a new process every 100 ms for processing eventually pending connections.
  -Since old V1, UnoLibs.Net makes a smart usage of the events so that you can
   execute your code with ease "on event"
  -NEW IN V.2
  -Fixed some bugs for the scanner class and improved scanning, can now be selected
   number of threads and timout (for xp sp2 users tcp fix patch required)
  -Added a fast and easy SEND FILES function for client
  -Added surely other minor bugs :P....

6.More about UnoLibs

UnoLibs are a collection of free (LGPL/Similar) tools and .net libraries.
Some are made by unoTeam, some are directly referenced thanks to the authors
and some are only linked.
The entire project (just begun!)is hosted at Http://
Main idea is to always have a complete-non repetitive SET of multipurpose and
reusable libraries for any kind of use, always at hand.

Key feature for any tool/library of the UnoLibs is the ease of use and reuse-ability.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

uno freeware
Web Developer
Italy Italy
...picture was not for codeproject hihihi.
well my usual way is to release only classes wich can be used by you very easily and quickly.

You may also be interested in...

Comments and Discussions

BugVirus/Malware Detected - "HackTool.Agent" Pin
IT Shepherd18-Sep-17 8:18
memberIT Shepherd18-Sep-17 8:18 
QuestionCould UNO Freeware please post the sourcecode again. if possible with updates for Visual studio 2015. Pin
wishmaster8615-Mar-17 2:32
memberwishmaster8615-Mar-17 2:32 
SuggestionFix issues if you upgrade project to Visual Studio 2015 and .NET 4.5 + Pin
wingnut9991-Nov-16 7:24
memberwingnut9991-Nov-16 7:24 
Suggestion[FIX] Crashes on UNKNOWN CONNECTION Pin
apeder10-Aug-16 11:42
memberapeder10-Aug-16 11:42 
QuestionServer is binding to wrong IP on my PC, Pin
Craig H23627-Jan-14 10:45
memberCraig H23627-Jan-14 10:45 
QuestionWhere is the source code download? Pin
Tim_102417-Jan-13 2:49
memberTim_102417-Jan-13 2:49 
QuestionRe: Where is the source code download? Pin
Member 96701931-Apr-13 11:44
memberMember 96701931-Apr-13 11:44 
AnswerRe: Where is the source code download? Pin
Tim_102411-Apr-13 2:06
memberTim_102411-Apr-13 2:06 
GeneralRe: Where is the source code download? Pin
jak6455-Jul-14 7:34
memberjak6455-Jul-14 7:34 
GeneralRe: Where is the source code download? Pin
mmminchia28-Aug-14 11:43
membermmminchia28-Aug-14 11:43 
QuestionHow to send a string array? Pin
Aldrin Jay Morales22-Sep-12 18:53
memberAldrin Jay Morales22-Sep-12 18:53 
GeneralMax connections Pin
Michael Timmermans18-Jul-12 23:56
memberMichael Timmermans18-Jul-12 23:56 
QuestionThank you Pin
forkee11-Jul-12 6:02
memberforkee11-Jul-12 6:02 
QuestionAttempted Download Pin
Member 90429867-Jul-12 15:22
memberMember 90429867-Jul-12 15:22 
GeneralMy vote of 5 Pin
manoj kumar choubey24-Feb-12 2:47
membermanoj kumar choubey24-Feb-12 2:47 
BugCrash on "unknown connection" Pin
xerax13-Dec-11 1:07
memberxerax13-Dec-11 1:07 
GeneralRe: Crash on "unknown connection" Pin
uno freeware5-Apr-12 11:49
memberuno freeware5-Apr-12 11:49 
GeneralRe: Crash on "unknown connection" Pin
ayman metwally30-Dec-13 20:40
memberayman metwally30-Dec-13 20:40 
GeneralRe: Crash on "unknown connection" Pin
apeder10-Aug-16 11:36
memberapeder10-Aug-16 11:36 
BugVirus reported! Pin
LeoKiz2-Nov-11 10:27
memberLeoKiz2-Nov-11 10:27 
BugDownload Pin
michaelbarb4-Oct-11 10:39
membermichaelbarb4-Oct-11 10:39 
GeneralRe: Download Pin
uno freeware5-Oct-11 4:22
memberuno freeware5-Oct-11 4:22 
GeneralRe: Download Pin
michaelbarb5-Oct-11 5:19
membermichaelbarb5-Oct-11 5:19 
QuestionReceiving Data from the Client? Pin
antonio62228-Jan-11 19:31
memberantonio62228-Jan-11 19:31 
AnswerRe: Receiving Data from the Client? Pin
Crook_EVB4-Apr-11 22:56
memberCrook_EVB4-Apr-11 22:56 
GeneralRe: Receiving Data from the Client? Pin
DomKue28-Aug-16 23:01
memberDomKue28-Aug-16 23:01 
GeneralMy vote of 5 Pin
iamgowda16-Dec-10 22:59
memberiamgowda16-Dec-10 22:59 
GeneralLooking for info, or a better solution [modified] Pin
Crook_EVB19-Nov-10 23:26
memberCrook_EVB19-Nov-10 23:26 
RantPackage Virus Pin
Twaitsey1-Nov-10 10:10
memberTwaitsey1-Nov-10 10:10 
GeneralRe: Package Virus Pin
uno freeware4-Nov-10 10:58
memberuno freeware4-Nov-10 10:58 
GeneralAgain Pin
uno freeware20-Aug-10 4:29
memberuno freeware20-Aug-10 4:29 
GeneralRe: Again Pin
Crook_EVB4-Apr-11 3:56
memberCrook_EVB4-Apr-11 3:56 
GeneralRe: Again Pin
uno freeware4-Apr-11 6:48
memberuno freeware4-Apr-11 6:48 
GeneralRe: Again Pin
Crook_EVB4-Apr-11 9:35
memberCrook_EVB4-Apr-11 9:35 
QuestionSendfiles Progressbar ? Pin
abensrhir6-Aug-10 3:36
memberabensrhir6-Aug-10 3:36 
AnswerRe: Sendfiles Progressbar ? Pin
uno freeware20-Aug-10 4:30
memberuno freeware20-Aug-10 4:30 
Questionerror in sending files Pin
monicasegundo1-Mar-10 11:52
membermonicasegundo1-Mar-10 11:52 
GeneralMy vote of 1 Pin
comasic24-Sep-09 9:51
membercomasic24-Sep-09 9:51 
GeneralRe: My vote of 1 Pin
uno freeware23-Dec-09 2:39
memberuno freeware23-Dec-09 2:39 
GeneralRe: My vote of 1 Pin
uno freeware23-Dec-09 2:44
memberuno freeware23-Dec-09 2:44 
QuestionCross-thread error ? Pin
dpcons11-Aug-09 10:22
memberdpcons11-Aug-09 10:22 
GeneralChange the IP of the listner to anothert device Pin
Tim Norton15-Jul-09 15:29
memberTim Norton15-Jul-09 15:29 
GeneralOverload resolution failed because no accessible 'Send' can be called without a narrowing conversion Pin
Mohammad Al Hoss16-Apr-09 5:01
memberMohammad Al Hoss16-Apr-09 5:01 
GeneralRe: Overload resolution failed because no accessible 'Send' can be called without a narrowing conversion Pin
uno freeware16-Apr-09 7:44
memberuno freeware16-Apr-09 7:44 
QuestionTCP and timer problem Pin
tommasopit18-Mar-09 0:22
membertommasopit18-Mar-09 0:22 
AnswerRe: TCP and timer problem Pin
uno freeware18-Mar-09 0:58
memberuno freeware18-Mar-09 0:58 
GeneralRe: TCP and timer problem Pin
tommasopit18-Mar-09 1:31
membertommasopit18-Mar-09 1:31 
GeneralInternet working Pin
rgccvieira2-Dec-08 16:14
memberrgccvieira2-Dec-08 16:14 
GeneralProblems with receiving a message Pin
matzensens7-Oct-08 4:04
membermatzensens7-Oct-08 4:04 
QuestionSend file over Gprs Pin
Badoxo21-Sep-08 15:45
memberBadoxo21-Sep-08 15:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171017.2 | Last Updated 1 Jun 2005
Article Copyright 2005 by uno freeware
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid