Energy Core Library
Energy.Core.Network Class Reference

Classes

class  SocketConnection
 

Static Public Member Functions

static string GetHostAddress (string host)
 
static AddressFamily GetAddressFamily (string address)
 
static SocketType GetSocketType (ProtocolType protocol, AddressFamily family)
 
static void Shutdown (Socket socket)
 
static bool IsConnected (Socket socket)
 Check if socket is connected More...
 
static string [] GetSocketConfigurationStringArray (System.Net.Sockets.Socket socket)
 Return current socket configuration as array of strings. More...
 
static System.Net.Sockets.Socket ConfigureSocket (System.Net.Sockets.Socket socket, int buffer, int timeout, int? linger, int? ttl, bool? exclusive)
 Make configuration of System.Net.Sockets.Socket object. More...
 
static System.Net.Sockets.TcpClient ConfigureTcpClient (System.Net.Sockets.TcpClient socket, int buffer, int timeout, int? ttl, int? linger, bool? exclusive)
 Make configuration of System.Net.Sockets.Socket object. More...
 
static System.Net.Sockets.TcpListener ConfigureTcpListener (System.Net.Sockets.TcpListener socket, int bufferSize, int timeout, int? ttl, int? linger, bool? exclusive)
 Make configuration of socket. For more details look for full ConfigureSocket(). More...
 
static System.Net.Sockets.Socket ConfigureSocket (System.Net.Sockets.Socket socket)
 Make configuration of System.Net.Sockets.Socket. For more details look for full ConfigureSocket(). More...
 
static System.Net.Sockets.TcpClient ConfigureTcpClient (System.Net.Sockets.TcpClient socket, int bufferSize)
 Make configuration of System.Net.Sockets.TcpClient. For more details look for full ConfigureSocket(). More...
 
static System.Net.Sockets.TcpClient ConfigureTcpClient (System.Net.Sockets.TcpClient socket, int bufferSize, int timeout)
 
static System.Net.Sockets.TcpClient ConfigureTcpClient (TcpClient socket)
 
static System.Net.Sockets.Socket ConfigureTcpSocket (Socket socket, int bufferSize)
 
static System.Net.Sockets.Socket ConfigureSocket (Socket socket, int bufferSize)
 
static System.Net.Sockets.Socket ConfigureSocket (Socket socket, int bufferSize, int timeout)
 
static int Ping (string address, int timeout, out System.Net.NetworkInformation.IPStatus status)
 
static int Ping (string address, int timeout)
 
static int Ping (string address)
 

Properties

static Energy.Base.Network.Settings Settings [get]
 

Member Function Documentation

◆ ConfigureSocket() [1/4]

static System.Net.Sockets.Socket Energy.Core.Network.ConfigureSocket ( System.Net.Sockets.Socket  socket,
int  buffer,
int  timeout,
int?  linger,
int?  ttl,
bool?  exclusive 
)
static

Make configuration of System.Net.Sockets.Socket object.

Parameters
socketSystem.Net.Sockets.Socket object
bufferBuffer size in bytes (typically 8192)
timeoutTimeout in milliseconds (10000 for 10 seconds)
lingerSpecifies behaviour when closing socket, possible values are: negative number to disable (attempts to send pending data until the default IP protocol time-out expires), zero (discards any pending data, for connection-oriented socket Winsock resets the connection), and positive number of seconds (attempts to send pending data until the specified time-out expires, if the attempt fails, then Winsock resets the connection).
ttlTTL value indicates the maximum number of routers the packet can traverse before the router discards the packet
exclusiveDon't allow another socket to bind to this port
Returns
System.Net.Sockets.Socket object itself

◆ ConfigureSocket() [2/4]

static System.Net.Sockets.Socket Energy.Core.Network.ConfigureSocket ( System.Net.Sockets.Socket  socket)
static

Make configuration of System.Net.Sockets.Socket. For more details look for full ConfigureSocket().

Parameters
socketSocket object
Returns
System.Net.Sockets.Socket object itself

◆ ConfigureSocket() [3/4]

static System.Net.Sockets.Socket Energy.Core.Network.ConfigureSocket ( Socket  socket,
int  bufferSize 
)
static

◆ ConfigureSocket() [4/4]

static System.Net.Sockets.Socket Energy.Core.Network.ConfigureSocket ( Socket  socket,
int  bufferSize,
int  timeout 
)
static

◆ ConfigureTcpClient() [1/4]

static System.Net.Sockets.TcpClient Energy.Core.Network.ConfigureTcpClient ( System.Net.Sockets.TcpClient  socket,
int  buffer,
int  timeout,
int?  ttl,
int?  linger,
bool?  exclusive 
)
static

Make configuration of System.Net.Sockets.Socket object.

Parameters
socketSystem.Net.Sockets.Socket object
bufferBuffer size in bytes (typically 8192)
timeoutTimeout in milliseconds (10000 for 10 seconds)
lingerLinger option
ttlTime To Live (TTL)
exclusiveDon't allow another socket to bind to this port
Returns
System.Net.Sockets.Socket object itself

◆ ConfigureTcpClient() [2/4]

static System.Net.Sockets.TcpClient Energy.Core.Network.ConfigureTcpClient ( System.Net.Sockets.TcpClient  socket,
int  bufferSize 
)
static

Make configuration of System.Net.Sockets.TcpClient. For more details look for full ConfigureSocket().

Parameters
socketSocket object
bufferSizeBuffer size in bytes (typically 8192)
Returns
System.Net.Sockets.Socket object itself

◆ ConfigureTcpClient() [3/4]

static System.Net.Sockets.TcpClient Energy.Core.Network.ConfigureTcpClient ( System.Net.Sockets.TcpClient  socket,
int  bufferSize,
int  timeout 
)
static

◆ ConfigureTcpClient() [4/4]

static System.Net.Sockets.TcpClient Energy.Core.Network.ConfigureTcpClient ( TcpClient  socket)
static

◆ ConfigureTcpListener()

static System.Net.Sockets.TcpListener Energy.Core.Network.ConfigureTcpListener ( System.Net.Sockets.TcpListener  socket,
int  bufferSize,
int  timeout,
int?  ttl,
int?  linger,
bool?  exclusive 
)
static

Make configuration of socket. For more details look for full ConfigureSocket().

Parameters
socketSocket object
bufferSizeBuffer size in bytes (typically 8192)
timeoutTimeout in milliseconds (10000 for 10 seconds)
lingerLinger option
ttlTime To Live (TTL)
exclusiveDon't allow another socket to bind to this port
Returns
System.Net.Sockets.Socket object itself

◆ ConfigureTcpSocket()

static System.Net.Sockets.Socket Energy.Core.Network.ConfigureTcpSocket ( Socket  socket,
int  bufferSize 
)
static

◆ GetAddressFamily()

static AddressFamily Energy.Core.Network.GetAddressFamily ( string  address)
static

◆ GetHostAddress()

static string Energy.Core.Network.GetHostAddress ( string  host)
static

◆ GetSocketConfigurationStringArray()

static string [] Energy.Core.Network.GetSocketConfigurationStringArray ( System.Net.Sockets.Socket  socket)
static

Return current socket configuration as array of strings.

Parameters
socket
Returns

◆ GetSocketType()

static SocketType Energy.Core.Network.GetSocketType ( ProtocolType  protocol,
AddressFamily  family 
)
static

◆ IsConnected()

static bool Energy.Core.Network.IsConnected ( Socket  socket)
static

Check if socket is connected

Parameters
socket
Returns

◆ Ping() [1/3]

static int Energy.Core.Network.Ping ( string  address,
int  timeout,
out System.Net.NetworkInformation.IPStatus  status 
)
static

◆ Ping() [2/3]

static int Energy.Core.Network.Ping ( string  address,
int  timeout 
)
static

◆ Ping() [3/3]

static int Energy.Core.Network.Ping ( string  address)
static

◆ Shutdown()

static void Energy.Core.Network.Shutdown ( Socket  socket)
static

Property Documentation

◆ Settings

Energy.Base.Network.Settings Energy.Core.Network.Settings
staticget

The documentation for this class was generated from the following file: