mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Move NSStream addition declarations to separate file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a4662001d
commit
f59ba481f0
9 changed files with 228 additions and 83 deletions
|
@ -249,67 +249,6 @@ typedef NSUInteger NSStreamEvent;
|
|||
|
||||
@end
|
||||
|
||||
/**
|
||||
* the additional interface defined for gnustep
|
||||
*/
|
||||
@interface NSStream (GNUstepExtensions)
|
||||
|
||||
/**
|
||||
* Creates and returns by reference an NSInputStream object and
|
||||
* NSOutputStream object for a local socket or named pipe connection
|
||||
* with the specified path. To use them you need to open them and wait
|
||||
* on the NSStreamEventOpenCompleted event on one of them.
|
||||
*/
|
||||
+ (void) getLocalStreamsToPath: (NSString *)path
|
||||
inputStream: (NSInputStream **)inputStream
|
||||
outputStream: (NSOutputStream **)outputStream;
|
||||
/**
|
||||
* Creates and returns by reference an NSInputStream object and NSOutputStream
|
||||
* object for a anonymous local socket or pipe. Although you still need to
|
||||
* open them, the open will be instantaneous, and no NSStreamEventOpenCompleted
|
||||
* event will be delivered.
|
||||
*/
|
||||
+ (void) pipeWithInputStream: (NSInputStream **)inputStream
|
||||
outputStream: (NSOutputStream **)outputStream;
|
||||
@end
|
||||
|
||||
/**
|
||||
* GSServerStream is a subclass of NSStream that encapsulate a "server" stream;
|
||||
* that is a stream that binds to a socket and accepts incoming connections
|
||||
*/
|
||||
@interface GSServerStream : NSStream
|
||||
|
||||
/**
|
||||
* Createe a ip (ipv6) server stream
|
||||
*/
|
||||
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
/**
|
||||
* Create a local (unix domain or named pipe) server stream
|
||||
*/
|
||||
+ (id) serverStreamToAddr: (NSString*)addr;
|
||||
|
||||
/**
|
||||
* This is the method that accepts a connection and generates two streams
|
||||
* as the server side inputStream and OutputStream.
|
||||
* Although you still need to open them, the open will be
|
||||
* instantanious, and no NSStreamEventOpenCompleted event will be delivered.
|
||||
*/
|
||||
- (void) acceptWithInputStream: (NSInputStream **)inputStream
|
||||
outputStream: (NSOutputStream **)outputStream;
|
||||
|
||||
/**
|
||||
* the designated initializer for a ip (ipv6) server stream
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port;
|
||||
|
||||
/**
|
||||
* the designated initializer for a local (unix domain or named pipe)
|
||||
* server stream
|
||||
*/
|
||||
- (id) initToAddr: (NSString*)addr;
|
||||
|
||||
@end
|
||||
|
||||
GS_EXPORT NSString * const NSStreamDataWrittenToMemoryStreamKey;
|
||||
GS_EXPORT NSString * const NSStreamFileCurrentOffsetKey;
|
||||
|
@ -331,15 +270,6 @@ GS_EXPORT NSString * const NSStreamSOCKSProxyVersion4;
|
|||
GS_EXPORT NSString * const NSStreamSOCKSProxyVersion5;
|
||||
GS_EXPORT NSString * const NSStreamSOCKSProxyVersionKey;
|
||||
|
||||
/** May be used to read the local IP address of a tcp/ip network stream. */
|
||||
GS_EXPORT NSString * const GSStreamLocalAddressKey;
|
||||
/** May be used to read the local port of a tcp/ip network stream. */
|
||||
GS_EXPORT NSString * const GSStreamLocalPortKey;
|
||||
/** May be used to read the remote IP address of a tcp/ip network stream. */
|
||||
GS_EXPORT NSString * const GSStreamRemoteAddressKey;
|
||||
/** May be used to read the remote port of a tcp/ip network stream. */
|
||||
GS_EXPORT NSString * const GSStreamRemotePortKey;
|
||||
|
||||
/**
|
||||
* Informal protocol for delegates of instance of the [NSStream] class.
|
||||
*/
|
||||
|
@ -351,6 +281,10 @@ GS_EXPORT NSString * const GSStreamRemotePortKey;
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !NO_GNUSTEP && !defined(GNUSTEP_BASE_INTERNAL)
|
||||
#import <GNUstepBase/NSStream+GNUstepBase.h>
|
||||
#endif
|
||||
|
||||
#endif /* 100200 */
|
||||
|
||||
#endif /* __NSStream_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue