C# Class Engine.Objects.SocketInstance

Represents a TCP socket
Inheritance: Jurassic.Library.ObjectInstance
Datei anzeigen Open project: Radnen/sphere-sfml Class Usage Examples

Public Methods

Method Description
ListenOnPort ( int port, [ address = "127.0.0.1" ) : SocketInstance
SocketInstance ( ScriptEngine parent, string address, int port ) : System

Opens a TCP client and returns it to Sphere.

SocketInstance ( ScriptEngine parent, string address, int port, TcpClient client ) : System

Wraps a TCP Client and returns it to Sphere.

Private Methods

Method Description
Close ( ) : void
GetPendingReadSize ( ) : int
IsConnected ( ) : bool
Read ( int size ) : ByteArrayInstance
Write ( ByteArrayInstance array ) : void

Method Details

ListenOnPort() public static method

public static ListenOnPort ( int port, [ address = "127.0.0.1" ) : SocketInstance
port int
address [
return SocketInstance

SocketInstance() public method

Opens a TCP client and returns it to Sphere.
public SocketInstance ( ScriptEngine parent, string address, int port ) : System
parent ScriptEngine The Parent Script Engine
address string IPv4 Address
port int The port top open
return System

SocketInstance() public method

Wraps a TCP Client and returns it to Sphere.
public SocketInstance ( ScriptEngine parent, string address, int port, TcpClient client ) : System
parent ScriptEngine The Parent Script Engine
address string IPv4 Address
port int The port top open
client System.Net.Sockets.TcpClient
return System