Exemple #1
0
 public FluxServer(IPAddress ipAddress, int port)
 {
     _ipAddress      = ipAddress;
     _port           = port;
     _listenCallback = ListenCallback;
     _timerCallback  = TimerCallback;
     _readCallback   = ReadCallback;
     _writeCallback  = WriteCallback;
     _closeCallback  = CloseCallback;
 }
Exemple #2
0
 public Http(IntPtr loop, IntPtr server, Action <Http, bool> readCallback, Action <Http> closeCallback)
 {
     _env             = new FluxEnv(this);
     _loop            = loop;
     _server          = server;
     _readCallback    = readCallback;
     _closeCallback   = closeCallback;
     _client          = Marshal.AllocHGlobal(Lib.uv_handle_size(HandleType.UV_TCP));
     _uvReadCallback  = ReadCallback;
     _uvWriteCallback = WriteCallback;
     _uvCloseCallback = CloseCallback;
     _handle          = GCHandle.Alloc(this);
 }