Differences From Artifact [b07d89367b]:
- File
src/OFTCPSocket.h
— part of check-in
[28ea4a8a67]
at
2010-07-07 20:57:04
on branch trunk
— Rename OFSocket to OFStreamSocket.
This is to reflect that it is a connection-based, sequenced, reliable,
two-way byte stream. (user: js, size: 1802) [annotate] [blame] [check-ins using]
To Artifact [64acad46b9]:
- File src/OFTCPSocket.h — part of check-in [0769e074eb] at 2010-11-24 19:45:10 on branch trunk — Documentation improvements. (user: js, size: 1999) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # include <ws2tcpip.h> #endif @class OFString; /** * \brief A class which provides functions to create and use TCP sockets. */ @interface OFTCPSocket: OFStreamSocket { struct sockaddr *sockAddr; socklen_t sockAddrLen; } /** * Connect the OFTCPSocket to the specified destination. * * \param service The service on the node to connect to * \param node The node to connect to */ - (void)connectToService: (OFString*)service onNode: (OFString*)node; /** * Bind socket on the specified node and service. * * \param service The service to bind | > > > | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # include <ws2tcpip.h> #endif @class OFString; /** * \brief A class which provides functions to create and use TCP sockets. * * To connect to a server, create a socket and connect it. * To create a server, create a socket, bind it and listen on it. */ @interface OFTCPSocket: OFStreamSocket { struct sockaddr *sockAddr; socklen_t sockAddrLen; } /** * Connect the OFTCPSocket to the specified destination. * * \param service The service on the node to connect to * \param node The node to connect to */ - (void)connectToService: (OFString*)service onNode: (OFString*)node; /** * Bind socket on the specified node and service. * * \param service The service to bind * \param node The node to bind to. Use @"0.0.0.0" for IPv4 or @"::" for IPv6 * to bind to all. * \param family The family to use (AF_INET for IPv4 or AF_INET6 for IPv6) */ - (void)bindService: (OFString*)service onNode: (OFString*)node withFamily: (int)family; /** |
︙ | ︙ |