00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _WIN32
00018 # include <sys/types.h>
00019 # include <sys/socket.h>
00020 # include <netdb.h>
00021 #endif
00022
00023 #import "OFStreamSocket.h"
00024
00025 #ifdef _WIN32
00026 # include <ws2tcpip.h>
00027 #endif
00028
00029 @class OFString;
00030
00037 @interface OFTCPSocket: OFStreamSocket
00038 {
00039 struct sockaddr *sockAddr;
00040 socklen_t sockAddrLen;
00041 }
00042
00049 - (void)connectToService: (OFString*)service
00050 onNode: (OFString*)node;
00051
00060 - (void)bindService: (OFString*)service
00061 onNode: (OFString*)node
00062 withFamily: (int)family;
00063
00069 - (void)listenWithBackLog: (int)backlog;
00070
00074 - (void)listen;
00075
00080 - (OFTCPSocket*)accept;
00081
00085 - (void)setKeepAlivesEnabled: (BOOL)enable;
00086
00092 - (OFString*)remoteAddress;
00093 @end