border border Developer Documentation border border
Project contains 4 main sources direcories
  - easy_socket : project main classes. All of them can be used in other projects (as the WeatherNotify once)
  - Network_Stuff : Network Stuff user interface. Sample of use of previous classes
  - Tools : All tool classes not specific to Network Stuff. Subdirectories names are enougth talking I think
  - resource : all resource files required

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 .... (See sample below). The easy_socket directory main classes are :
  - tcp_socket : classes for creating easily standart tcp clients or servers
  - udp_socket : classes for creating easily standart udp clients or servers
  - icmp : classes for all icmp messages. Allow to make icmp clients and icmp servers.
  - ip_header : classes for raw ipV4 sockets. Allow to make raw IPV4 clients and servers.
  - tcp_header : classes for raw tcp sockets. Allow to make raw TCP clients and servers.
  - udp_header : classes for raw udp sockets. Allow to make raw UDP clients and servers.
  - iphelper : Class to access win32 iphelper API. Used to retreive IP/TCP/UDP tables, IP/TCP/UDP/ICMP stats
  - RemoteShutDown : Class to access win32 API for remote shutdown
  - wake_on_lan : Class to send "magic packets" for waking up remote computers
  - ClassProxy (version 3.02 only no sample in Network Stuff, but in WeatherNotify) : proxy class to use proxy with no authentification. Supported proxies are HTTP GET, HTTP CONNECT, SOCKS4, SOCKS5

Sample of use for TCP:
easy_socket.tcp.Socket_Data clt;
clt=new easy_socket.tcp.Socket_Data();

// add events
    new easy_socket.tcp.Socket_Data_Closed_by_Remote_Side_EventHandler(socket_closed_by_remote_side);
clt.event_Socket_Data_Connected_To_Remote_Host +=
    new easy_socket.tcp.Socket_Data_Connected_To_Remote_Host_EventHandler(socket_connected_to_remote_host);
clt.event_Socket_Data_DataArrival +=
    new easy_socket.tcp.Socket_Data_DataArrival_EventHandler(socket_data_arrival);
    new easy_socket.tcp.Socket_Data_Error_EventHandler(socket_error);
// 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, 
                                                          e.buffer_size );

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