00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #import "ONInternetSocket.h"
00011
00012 @interface ONTCPSocket : ONInternetSocket
00013 {
00014 struct {
00015 unsigned int useNagle: 2;
00016 unsigned int pushWrites: 2;
00017 } tcpFlags;
00018 }
00019
00020 + (Class)defaultTCPSocketClass;
00021 + (void)setDefaultTCPSocketClass:(Class)aClass;
00022
00023 + (ONTCPSocket *)tcpSocket;
00024
00025
00026 - (void)startListeningOnAnyLocalPort;
00027 - (void)startListeningOnLocalPort:(unsigned short int)port;
00028 - (void)startListeningOnLocalPort:(unsigned short int)port allowingAddressReuse:(BOOL)reuse;
00029 - (void)startListeningOnLocalService:(ONServiceEntry *)service;
00030
00031 - (void)acceptConnection;
00032 - (ONTCPSocket *)acceptConnectionOnNewSocket;
00033
00034 - (void)setUsesNagleDelay:(BOOL)nagle;
00035
00036
00037 - (void)setPushesWrites:(BOOL)push;
00038
00039
00040 @end
00041
00042 #import "FrameworkDefines.h"
00043
00044
00045 OmniNetworking_EXTERN NSString *ONTCPSocketListenFailedExceptionName;
00046 OmniNetworking_EXTERN NSString *ONTCPSocketAcceptFailedExceptionName;
00047 OmniNetworking_EXTERN NSString *ONTCPSocketWouldBlockExceptionName;