From 0b83e5b72590b5c73db07bfb2e04e9d7615c83b7 Mon Sep 17 00:00:00 2001 From: mccallum Date: Tue, 12 Mar 1996 14:56:43 +0000 Subject: [PATCH] Declare new methods. (Port _packet_invocation): New ivar. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1112 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/base/Port.h | 17 ++++++++++++++++- Source/objects/Port.h | 17 ++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/Headers/gnustep/base/Port.h b/Headers/gnustep/base/Port.h index 71af3c8c2..e65d582b2 100644 --- a/Headers/gnustep/base/Port.h +++ b/Headers/gnustep/base/Port.h @@ -49,11 +49,26 @@ @interface InPort : Port +{ + id _packet_invocation; +} + newForReceiving; + newForReceivingFromRegisteredName: (id )name; -/* Get a packet from the net and return it. If no packet is received +/* Register/Unregister this port for input handling through RunLoop + RUN_LOOP in mode MODE. */ +- (void) addToRunLoop: run_loop forMode: (id )mode; +- (void) removeFromRunLoop: run_loop forMode: (id )mode; + +/* When a RunLoop is handling this InPort, and a new incoming + packet arrives, INVOCATION will be invoked with the new packet + as an argument. The INVOCATION is responsible for releasing + the packet. */ +- (void) setPacketInvocation: (id )invocation; + +/* An alternative to the above way for receiving packets from this port. + Get a packet from the net and return it. If no packet is received within MILLISECONDS, then return nil. The caller is responsible for releasing the packet. */ - receivePacketWithTimeout: (int)milliseconds; diff --git a/Source/objects/Port.h b/Source/objects/Port.h index 71af3c8c2..e65d582b2 100644 --- a/Source/objects/Port.h +++ b/Source/objects/Port.h @@ -49,11 +49,26 @@ @interface InPort : Port +{ + id _packet_invocation; +} + newForReceiving; + newForReceivingFromRegisteredName: (id )name; -/* Get a packet from the net and return it. If no packet is received +/* Register/Unregister this port for input handling through RunLoop + RUN_LOOP in mode MODE. */ +- (void) addToRunLoop: run_loop forMode: (id )mode; +- (void) removeFromRunLoop: run_loop forMode: (id )mode; + +/* When a RunLoop is handling this InPort, and a new incoming + packet arrives, INVOCATION will be invoked with the new packet + as an argument. The INVOCATION is responsible for releasing + the packet. */ +- (void) setPacketInvocation: (id )invocation; + +/* An alternative to the above way for receiving packets from this port. + Get a packet from the net and return it. If no packet is received within MILLISECONDS, then return nil. The caller is responsible for releasing the packet. */ - receivePacketWithTimeout: (int)milliseconds;