00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _WIN32
00013 # include <sys/types.h>
00014 # include <sys/socket.h>
00015 # include <netdb.h>
00016 #endif
00017
00018 #import "OFSocket.h"
00019
00020 #ifdef _WIN32
00021 # include <ws2tcpip.h>
00022 #endif
00023
00024 @class OFString;
00025
00029 @interface OFTCPSocket: OFSocket
00030 {
00031 struct sockaddr *sockAddr;
00032 socklen_t sockAddrLen;
00033 }
00034
00041 - (void)connectToService: (OFString*)service
00042 onNode: (OFString*)node;
00043
00051 - (void)bindService: (OFString*)service
00052 onNode: (OFString*)node
00053 withFamily: (int)family;
00054
00060 - (void)listenWithBackLog: (int)backlog;
00061
00065 - (void)listen;
00066
00071 - (OFTCPSocket*)accept;
00072
00076 - (void)setKeepAlivesEnabled: (BOOL)enable;
00077
00083 - (OFString*)remoteAddress;
00084 @end