Skip to content

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

Notifications You must be signed in to change notification settings

malsabi/IViewNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Packages

No packages published

Languages