mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Declare new ivars and notfication strings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1068 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b13cd50a86
commit
63b4e802b0
2 changed files with 44 additions and 14 deletions
|
@ -31,13 +31,13 @@
|
|||
#include <netdb.h>
|
||||
#include <Foundation/NSMapTable.h>
|
||||
|
||||
@interface TcpPacket : Packet
|
||||
@end
|
||||
/* A concrete implementation of a Port object implemented on top of
|
||||
SOCK_STREAM connections. */
|
||||
|
||||
@interface TcpInPort : InPort
|
||||
{
|
||||
int _socket;
|
||||
struct sockaddr_in _address;
|
||||
struct sockaddr_in _listening_address;
|
||||
fd_set active_fd_set;
|
||||
NSMapTable *client_sock_2_out_port;
|
||||
NSMapTable *client_sock_2_packet;
|
||||
|
@ -50,20 +50,26 @@
|
|||
within MILLISECONDS, then return nil. The caller is responsible
|
||||
for releasing the packet. */
|
||||
- receivePacketWithTimeout: (int)milliseconds;
|
||||
/* xxx Change this name to - newPacketReceivedWithTimeout: to emphasize
|
||||
need to release the returned packet. */
|
||||
|
||||
- (int) portNumber;
|
||||
- (id <Collecting>) connectedOutPorts;
|
||||
- (unsigned) numberOfConnectedOutPorts;
|
||||
|
||||
- (void) checkConnection;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface TcpOutPort : OutPort
|
||||
{
|
||||
int _socket;
|
||||
struct sockaddr_in _address;
|
||||
id connected_in_port;
|
||||
/* This is actually the address of the listen()'ing socket of the remote
|
||||
TcpInPort we are connected to, not the address of the _socket ivar. */
|
||||
struct sockaddr_in _remote_in_port_address;
|
||||
/* This is the address of our remote peer socket. */
|
||||
struct sockaddr_in _peer_address;
|
||||
/* The TcpInPort that is polling our _socket with select(). */
|
||||
id _polling_in_port;
|
||||
}
|
||||
|
||||
+ newForSendingToPortNumber: (unsigned short)n
|
||||
|
@ -76,7 +82,16 @@
|
|||
|
||||
@end
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
@interface TcpPacket : Packet
|
||||
@end
|
||||
|
||||
|
||||
/* Notification Strings. */
|
||||
extern NSString *InPortClientBecameInvalidNotification;
|
||||
extern NSString *InPortAcceptedClientNotification;
|
||||
|
||||
#endif /* __TcpPort_h__OBJECTS_INCLUDE */
|
||||
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
#include <netdb.h>
|
||||
#include <Foundation/NSMapTable.h>
|
||||
|
||||
@interface TcpPacket : Packet
|
||||
@end
|
||||
/* A concrete implementation of a Port object implemented on top of
|
||||
SOCK_STREAM connections. */
|
||||
|
||||
@interface TcpInPort : InPort
|
||||
{
|
||||
int _socket;
|
||||
struct sockaddr_in _address;
|
||||
struct sockaddr_in _listening_address;
|
||||
fd_set active_fd_set;
|
||||
NSMapTable *client_sock_2_out_port;
|
||||
NSMapTable *client_sock_2_packet;
|
||||
|
@ -50,20 +50,26 @@
|
|||
within MILLISECONDS, then return nil. The caller is responsible
|
||||
for releasing the packet. */
|
||||
- receivePacketWithTimeout: (int)milliseconds;
|
||||
/* xxx Change this name to - newPacketReceivedWithTimeout: to emphasize
|
||||
need to release the returned packet. */
|
||||
|
||||
- (int) portNumber;
|
||||
- (id <Collecting>) connectedOutPorts;
|
||||
- (unsigned) numberOfConnectedOutPorts;
|
||||
|
||||
- (void) checkConnection;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface TcpOutPort : OutPort
|
||||
{
|
||||
int _socket;
|
||||
struct sockaddr_in _address;
|
||||
id connected_in_port;
|
||||
/* This is actually the address of the listen()'ing socket of the remote
|
||||
TcpInPort we are connected to, not the address of the _socket ivar. */
|
||||
struct sockaddr_in _remote_in_port_address;
|
||||
/* This is the address of our remote peer socket. */
|
||||
struct sockaddr_in _peer_address;
|
||||
/* The TcpInPort that is polling our _socket with select(). */
|
||||
id _polling_in_port;
|
||||
}
|
||||
|
||||
+ newForSendingToPortNumber: (unsigned short)n
|
||||
|
@ -76,7 +82,16 @@
|
|||
|
||||
@end
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
@interface TcpPacket : Packet
|
||||
@end
|
||||
|
||||
|
||||
/* Notification Strings. */
|
||||
extern NSString *InPortClientBecameInvalidNotification;
|
||||
extern NSString *InPortAcceptedClientNotification;
|
||||
|
||||
#endif /* __TcpPort_h__OBJECTS_INCLUDE */
|
||||
|
||||
|
|
Loading…
Reference in a new issue