Ejemplo n.º 1
0
 static SocketFactory()
 {
     _open             = SocketOpened;
     _close            = SocketClose;
     _write            = SocketWrittenTo;
     _completedReceive = SocketCompletedReceive;
     InternalFactory   = new C4SocketFactory(_open, _close, _write, _completedReceive);
     Native.c4socket_registerFactory(InternalFactory);
 }
Ejemplo n.º 2
0
 static SocketFactory()
 {
     _open             = new SocketOpenDelegate(SocketOpened);
     _close            = new SocketCloseDelegate(SocketClosed);
     _write            = new SocketWriteDelegate(SocketWrittenTo);
     _completedReceive = new SocketCompletedReceiveDelegate(SocketCompletedReceive);
     InternalFactory   = new C4SocketFactory(_open, _close, _write, _completedReceive);
     Native.c4socket_registerFactory(InternalFactory);
 }
Ejemplo n.º 3
0
        static SocketFactory()
        {
            _open             = SocketOpened;
            _close            = SocketClose;
            _requestClose     = SocketRequestClose;
            _write            = SocketWrittenTo;
            _completedReceive = SocketCompletedReceive;
            _dispose          = SocketDispose;
            InternalFactory   = new C4SocketFactory
            {
                framing          = C4SocketFraming.WebSocketClientFraming,
                open             = Marshal.GetFunctionPointerForDelegate(_open),
                close            = Marshal.GetFunctionPointerForDelegate(_close),
                write            = Marshal.GetFunctionPointerForDelegate(_write),
                completedReceive = Marshal.GetFunctionPointerForDelegate(_completedReceive),
                dispose          = Marshal.GetFunctionPointerForDelegate(_dispose)
            };

            Native.c4socket_registerFactory(InternalFactory);
        }
 public static extern void c4socket_registerFactory(C4SocketFactory factory);
Ejemplo n.º 5
0
 public static extern C4Socket *c4socket_fromNative(C4SocketFactory factory, void *nativeHandle, C4Address *address);
 public C4Socket *c4socket_fromNative(C4SocketFactory factory, void *nativeHandle, C4Address *address) => Native.c4socket_fromNative(factory, nativeHandle, address);
 public void c4socket_registerFactory(C4SocketFactory factory) => Native.c4socket_registerFactory(factory);