C# Class Pdelvo.Minecraft.Network.Extensions

Datei anzeigen Open project: pdelvo/Pdelvo.Minecraft

Public Methods

Method Description
Connect ( this socket, IPAddress addresses, int port, System.TimeSpan timeout ) : bool

Connects the specified socket.

Connect ( this socket, IPEndPoint endPoint, System.TimeSpan timeout ) : bool
Connect ( this socket, string host, int port, System.TimeSpan timeout ) : bool

Connects the specified socket.

ParseEndPoint ( string str ) : IPEndPoint
ReadByteAsync ( this stream ) : Task
TryParseEndPoint ( string str, IPEndPoint &value ) : bool
WriteByteAsync ( this stream, byte value ) : System.Threading.Tasks.Task

Private Methods

Method Description
AsyncConnect ( Socket socket, Func connect, System.TimeSpan timeout ) : bool

Asyncs the connect.

Method Details

Connect() public static method

Connects the specified socket.
public static Connect ( this socket, IPAddress addresses, int port, System.TimeSpan timeout ) : bool
socket this The socket.
addresses System.Net.IPAddress The addresses.
port int The port.
timeout System.TimeSpan The timeout.
return bool

Connect() public static method

public static Connect ( this socket, IPEndPoint endPoint, System.TimeSpan timeout ) : bool
socket this
endPoint System.Net.IPEndPoint
timeout System.TimeSpan
return bool

Connect() public static method

Connects the specified socket.
public static Connect ( this socket, string host, int port, System.TimeSpan timeout ) : bool
socket this The socket.
host string The host.
port int The port.
timeout System.TimeSpan The timeout.
return bool

ParseEndPoint() public static method

public static ParseEndPoint ( string str ) : IPEndPoint
str string
return System.Net.IPEndPoint

ReadByteAsync() public static method

public static ReadByteAsync ( this stream ) : Task
stream this
return Task

TryParseEndPoint() public static method

public static TryParseEndPoint ( string str, IPEndPoint &value ) : bool
str string
value System.Net.IPEndPoint
return bool

WriteByteAsync() public static method

public static WriteByteAsync ( this stream, byte value ) : System.Threading.Tasks.Task
stream this
value byte
return System.Threading.Tasks.Task