Inheritance: NativeObject
Exemple #1
0
		static void TrampolineWakeupHandler (IntPtr block, OS_nw_framer framer)
		{
			var del = BlockLiteral.GetTarget<Action<NWFramer>> (block);
			if (del != null) {
				var nwFramer = new NWFramer (framer, owns: true);
				del (nwFramer);
			}
		}
Exemple #2
0
		static nuint TrampolineInputHandler (IntPtr block, OS_nw_framer framer)
		{
			var del = BlockLiteral.GetTarget<NWFramerInputDelegate> (block);
			if (del != null) {
				var nwFramer = new NWFramer (framer, owns: true);
				return del (nwFramer);
			}
			return 0;
		}
Exemple #3
0
		static void TrampolineOutputHandler (IntPtr block, OS_nw_framer framer, OS_nw_protocol_metadata message, nuint message_length, bool is_complete)
		{
			var del = BlockLiteral.GetTarget<Action<NWFramer, NWProtocolMetadata, nuint, bool>> (block);
			if (del != null) {
				var nwFramer = new NWFramer (framer, owns: true);
				var nwProtocolMetadata = new NWFramerMessage (message, owns: true);
				del (nwFramer, nwProtocolMetadata, message_length, is_complete);
			}
		}
        static NWFramerStartResult TrampolineCreateFramerHandler(IntPtr block, IntPtr framer)
        {
            // get and call, this is internal and we are trying to do all the magic in the call
            var del = BlockLiteral.GetTarget <Func <NWFramer, NWFramerStartResult> > (block);

            if (del != null)
            {
                var nwFramer = new NWFramer(framer, owns: true);
                return(del(nwFramer));
            }
            return(NWFramerStartResult.Unknown);
        }