Shadow Network Framework
0.0.1-alpha
.NET Client Library for Shadow Network Framework
|
Objects of this class are what controls and handles Connections to the Host. More...
Public Member Functions | |
Connection () | |
Create a new Connection Object. | |
Connection | Connect () |
Connects The instance to the target host. | |
Connection | SetHost (string Host) |
Set's the connection host for this instance. | |
Connection | SetPort (int Port) |
Sets the connection host's port for this instance. | |
Connection | SetOnConnection (SimpleCB OnConnect) |
Sets The callbackto be called Upon Connection. | |
Connection | SetOnSNFFail (SimpleCB OnSNFFail) |
Sets The callbackto be called Upon failure of the SNF Protocol. | |
Connection | SetOnSocketFail (SocketExceptionCB OnSocketFail) |
Sets The callbackto be called Upon Socket Connection Failure. | |
Connection | SetOnException (ExceptionCB OnException) |
Sets The callbackto be called Upon Any Exception that is not. | |
Connection | SetOnTimeout (SimpleCB OnTimeout) |
Sets The callbackto be called Connection Timeout. | |
Connection | AwaitConnection (TimeSpan timeout) |
Block Until the instance is Connected. | |
Connection | AwaitConnection (int milisecondtimeout) |
Block Until the instance is Connected in Miliseconds. | |
void | Send (Request r) |
Sends the request through the connection instance. | |
Static Public Member Functions | |
static Connection | get () |
Returns the Global Connection Instance. | |
static Connection | Instantiate (string host, int Port) |
Instantiates a new Global Connection Instance. | |
static Connection | Instantiate () |
Instantiats a Global Connection instance. | |
static void | SetDefaultHost (string host) |
Changes The Default Host URL. | |
static void | SetDefaultPort (int port) |
Changes The Default Port. | |
static void | InstanceSend (Request R) |
Send a Request through the Global Connection Instance. | |
Properties | |
static bool | isInitialized [get] |
Returns if the Global Connection Instance ( See get ) is instatiated or not. | |
bool | isConnected [get] |
Returns if the Instance is currently Connected. | |
string | Host [get] |
Returns The Instance's Host URL. | |
int | Port [get] |
Returns The instance's connection port. | |
ClientInfo | ClientInfo [get] |
Returns ClientInfo of the Client. | |
bool | isInstanceInitialized [get] |
Returns if the instance is initialized or not. | |
Objects of this class are what controls and handles Connections to the Host.
|
inline |
Create a new Connection Object.
|
static |
Returns the Global Connection Instance.
null
if no instance was registred
|
inlinestatic |
Instantiates a new Global Connection Instance.
host | The SNF host to Connect to |
Port | The Port of the SNF host |
ClassUninitialized | If OPCode was not Initialized |
|
static |
Instantiats a Global Connection instance.
|
static |
Changes The Default Host URL.
host | New Default SNF Host |
|
static |
Changes The Default Port.
port | New Default SNF Port |
|
inlinestatic |
Send a Request through the Global Connection Instance.
R | Request to send |
ClassInstanceUninitialized | If The Global Connection Instance is not instantiated
|
|
inline |
Connects The instance to the target host.
|
inline |
Set's the connection host for this instance.
Host | The new connection host |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets the connection host's port for this instance.
Port | The new Conenction's Port |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets The callbackto be called Upon Connection.
OnConnect | Callback to called |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets The callbackto be called Upon failure of the SNF Protocol.
OnSNFFail | Callback to called |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets The callbackto be called Upon Socket Connection Failure.
OnSocketFail | Callback to called |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets The callbackto be called Upon Any Exception that is not.
OnException | Callback to called |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Sets The callbackto be called Connection Timeout.
OnTimeout | Callback to called |
Exceptions.Connection.AlreadyConnected | Cannot Change this variable when the connection has already connected |
|
inline |
Block Until the instance is Connected.
timeout | Maximum Allowed Timeout |
InstanceUninitialized | Instance was not Initialized |
Exceptions.Connection.NotConnecting | Instance was not connecting, Call this after Connect |
|
inline |
Block Until the instance is Connected in Miliseconds.
milisecondtimeout | Maximum Allowed Timeout in Miliseconds |
InstanceUninitialized | Instance was not Initialized |
Exceptions.Connection.NotConnecting | Instance was not connecting, Call this after Connect |
|
inline |
Sends the request through the connection instance.
r | Request to be sent |
InstanceUninitialized | Instance was not initialized |
Exceptions.Connection.NotConnected | Instance was not connected |
|
staticget |
Returns if the Global Connection Instance ( See get ) is instatiated or not.
|
get |
Returns if the Instance is currently Connected.
|
get |
Returns The Instance's Host URL.
|
get |
Returns The instance's connection port.
|
get |
Returns ClientInfo of the Client.
|
get |
Returns if the instance is initialized or not.