Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IViewNet

About

An advanced library used for interprocess communication which provides a Server/Client (Sockets) and Process Pipelining.

Creating a Server Listener

NetConfig is the network configuration for server/client which contains all of the needed properties to set up the server or client.

If you want to use the default configuration for server call the method

NetConfig.CreateDefaultServerConfig();

If you want to use the default configuration for client call the method

NetConfig.CreateDefaultClientConfig();

Setting the server

NetConfig ServerConfig = NetConfig.CreateDefaultServerConfig();
Server MyServer = new Server(ServerConfig);
MyServer.OnClientConnect += ParentServer_OnClientConnect;
MyServer.OnClientSend += ParentServer_OnClientSend;
MyServer.OnClientReceive += ParentServer_OnClientReceive;
MyServer.OnClientDisconnect += ParentServer_OnClientDisconnect;
MyServer.OnClientException += ParentServer_OnClientException;
MyServer.OnClientBlackList += ParentServer_OnClientBlackList;
MyServer.PacketManager = CreateCommands();
StartListenerResult ListenerResult = MyServer.StartListener();
if (ListenerResult.IsOperationSuccess)
{
    StartAcceptorResult AcceptorResult = MyServer.StartAcceptor();
    if (AcceptorResult.IsOperationSuccess)
    {
        IsParentRunning = true;
        SetOnParentCreated(string.Format("{0}\n{1}", ListenerResult.Message, AcceptorResult.Message));
    }
    else
    {
        SetOnException(AcceptorResult.Message);
    }
}
else
{
    SetOnException(ListenerResult.Message);
}

About

Provides advanced Inter Process Communication (IPC) used for network communication or process communication.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages