You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ushakov Michael (Ушаков Михаил) edited this page Jun 20, 2018
·
2 revisions
For using scripted tcp server we have to use FlexibleTcpServer (implementation on ITcpServer in MossbauerLab.TinyTcpServer.Core). Script can implement ANY functionality (i.e. SMTP, FTP or even HTTP server) For working with script we MUST have entry method in class ServerScript:
public void Init(ref ITcpServer server)
Full script example is here (echo server):
For using FlexibleTcpServer me must pass 1 obligatory parameter - Server script file and 3 optional (ipaddress, port and server setting). If optional parameter were not passed it uses default values:
ip address - 127.0.0.1
tcp port - 16000
server settings with default values (see code)
Example of how to use FlexibleTcpServer is very simple:
`