Click here to Skip to main content
13,344,287 members (64,368 online)
Click here to Skip to main content
Add your own
alternative version


133 bookmarked
Posted 5 Oct 2004

Network Stuff (easy socket v3)

, 2 Jun 2005
Rate this:
Please Sign up or sign in to vote.
A class with event handlers for TCP, UDP or ICMP sockets; includes ping, traceroute, whois, ARP, and IPHelper functions and raw packets forging/ capturing.

Because of errors between VS 2002 and 2003, I've decided to put the two projects to solve resx and obsolete warning troubles.

Sample Image - networkstuff.jpg


This code contains a class for socket: ICMP, TCP, UDP, raw TCP, raw UDP, raw IP, and a class for IPHelper functions. All the classes for socket are made with the same view: provide handler for events like connected, closed, closed_by_remote_side, data_arrival, error ....

The sample project is included in beta version, it provides a graphical interface for Telnet, ping, traceroute, whois, packet capture, packet forging, scanning, viewing stats (IPHelper sample), sending ARP, DNS, wake and shutdown on LAN.

How to use

See the following sample for TCP:

easy_socket.tcp.Socket_Data clt;
clt=new easy_socket.tcp.Socket_Data();

// add events
clt.event_Socket_Data_Closed_by_Remote_Side+= new 
clt.event_Socket_Data_Connected_To_Remote_Host +=new 
clt.event_Socket_Data_DataArrival +=new 
// connect

// handlers
protected void 
    socket_closed_by_remote_side(easy_socket.tcp.Socket_Data sender, 
    EventArgs e)

  // handler code

protected void 
    socket_connected_to_remote_host(easy_socket.tcp.Socket_Data sender, 
    EventArgs e)
  // handler code

protected void socket_data_arrival(easy_socket.tcp.Socket_Data sender, 
                         easy_socket.tcp.EventArgs_ReceiveDataSocket e)
    string strdata=System.Text.Encoding.Default.GetString(e.buffer, 
                                                0, e.buffer_size );

protected void socket_error(easy_socket.tcp.Socket_Data sender, 
                         easy_socket.tcp.EventArgs_Exception e)
    string strerror=e.exception.Message;

As you can see, you can save a lot of time using these classes.


  • 28 Feb 05 - updated VS.NET 2003 source code.
  • 09 May 05
    • Began Telnet protocol implementation.
    • Interactive TCP/UDP added.
    • Some bug corrections.
  • 03 Jun 05
    • Stat graphs added.
    • Interface improvement.
    • Telnet horizontal tab bug removed.
    • More bug corrections.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

You may also be interested in...


Comments and Discussions

QuestionHow could we act on Routing Table? Pin
Anonymous16-May-05 6:49
sussAnonymous16-May-05 6:49 
AnswerRe: How could we act on Routing Table? Pin
Anonymous16-May-05 10:07
sussAnonymous16-May-05 10:07 
GeneralRe: How could we act on Routing Table? Pin
Anonymous18-May-05 1:37
sussAnonymous18-May-05 1:37 
GeneralHaving problem with packet forging... Pin
Anonymous3-May-05 2:24
sussAnonymous3-May-05 2:24 
GeneralRe: Having problem with packet forging... [modified] Pin
Landarzar11-Jun-06 23:43
memberLandarzar11-Jun-06 23:43 
QuestionBlocking IP Packets? Pin
Mdg27-Apr-05 9:56
memberMdg27-Apr-05 9:56 
GeneralGPL... Pin
IGx8927-Mar-05 2:33
memberIGx8927-Mar-05 2:33 
GeneralRe: GPL... Pin
rantanplanisback29-Mar-05 7:49
memberrantanplanisback29-Mar-05 7:49 
extract of the gpl faq:

"I'd like to incorporate GPL-covered software in my proprietary system. Can I do this?
You cannot incorporate GPL-covered software in a proprietary system. The goal of the GPL is to grant everyone the freedom to copy, redistribute, understand, and modify a program. If you could incorporate GPL-covered software into a non-free system, it would have the effect of making the GPL-covered software non-free too.

A system incorporating a GPL-covered program is an extended version of that program. The GPL says that any extended version of the program must be released under the GPL if it is released at all. This is for two reasons: to make sure that users who get the software get the freedom they should have, and to encourage people to give back improvements that they make.

However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program.

The difference between this and "incorporating" the GPL-covered software is partly a matter of substance and partly form. The substantive part is this: if the two programs are combined so that they become effectively two parts of one program, then you can't treat them as two separate programs. So the GPL has to cover the whole thing.

If the two programs remain well separated, like the compiler and the kernel, or like an editor and a shell, then you can treat them as two separate programs--but you have to do it properly. The issue is simply one of form: how you describe what you are doing. Why do we care about this? Because we want to make sure the users clearly understand the free status of the GPL-covered software in the collection.

If people were to distribute GPL-covered software calling it "part of" a system that users know is partly proprietary, users might be uncertain of their rights regarding the GPL-covered software. But if they know that what they have received is a free program plus another program, side by side, their rights will be clear."

You're quite fun: you like to download sources made by others but don't want to share your one...
GeneralRe: GPL... Pin
IGx8929-Mar-05 7:59
memberIGx8929-Mar-05 7:59 
GeneralRe: GPL... Pin
rantanplanisback29-Mar-05 9:42
memberrantanplanisback29-Mar-05 9:42 
GeneralRe: GPL... Pin
IGx8929-Mar-05 11:28
memberIGx8929-Mar-05 11:28 
GeneralRe: GPL... Pin
pedrito6810-May-05 6:35
memberpedrito6810-May-05 6:35 
GeneralRe: GPL... Pin
Robert M. Bouwens9-May-05 20:58
memberRobert M. Bouwens9-May-05 20:58 
GeneralRe: GPL... Pin
Sean McCormack3-Jun-05 7:14
memberSean McCormack3-Jun-05 7:14 
GeneralRe: GPL... [modified] Pin
Ryan L. Schneider24-Jul-06 6:33
memberRyan L. Schneider24-Jul-06 6:33 
GeneralTCP SYN SYN/ACK issues Pin
banduraj15-Mar-05 9:56
memberbanduraj15-Mar-05 9:56 
GeneralRe: TCP SYN SYN/ACK issues Pin
rantanplanisback22-Mar-05 12:24
memberrantanplanisback22-Mar-05 12:24 
GeneralSource code formatting Suggestion Pin
mrbelles27-Feb-05 19:17
membermrbelles27-Feb-05 19:17 
GeneralRe: Source code formatting Suggestion Pin
mrbelles27-Feb-05 19:31
membermrbelles27-Feb-05 19:31 
GeneralRe: Source code formatting Suggestion Pin
jacquelin.potier3-Mar-05 11:32
sussjacquelin.potier3-Mar-05 11:32 
GeneralRe: Source code formatting Suggestion Pin
Unruled Boy9-May-05 19:41
memberUnruled Boy9-May-05 19:41 
GeneralGot 1 errors, 3 Warning Pin
anonymous....29-Jan-05 4:40
sussanonymous....29-Jan-05 4:40 
GeneralRuntime Exceptions Pin
dfhgesart29-Jan-05 4:55
sussdfhgesart29-Jan-05 4:55 
GeneralRe: Runtime Exceptions Pin
jacquelin.potier8-Feb-05 2:50
sussjacquelin.potier8-Feb-05 2:50 
GeneralRe: Got 1 errors, 3 Warning Pin
jacquelin.potier5-Feb-05 6:36
sussjacquelin.potier5-Feb-05 6:36 

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
Web01 | 2.8.180111.1 | Last Updated 3 Jun 2005
Article Copyright 2004 by rantanplanisback
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid