Used to make a connection between two peers. More...
#import <Connection.h>
Public Member Functions | |
| (id) | - initWithHostAddress:andPort: |
| (id) | - initWithNativeSocketHandle: |
| (id) | - initWithNetService: |
| (BOOL) | - connect |
| (void) | - close |
| (void) | - sendNetworkPacket: |
| (NSString *) | - getHost |
| (NSInteger) | - getPort |
| (void) | - clean |
| (BOOL) | - setupSocketStreams |
| (void) | - readStreamHandleEvent: |
| (void) | - writeStreamHandleEvent: |
| (void) | - readFromStreamIntoIncomingBuffer |
| (void) | - writeOutgoingBufferToStream |
Protected Attributes | |
| NSString * | host |
| int | port |
| CFSocketNativeHandle | connectedSocketHandle |
| NSNetService * | netService |
| CFReadStreamRef | readStream |
| bool | readStreamOpen |
| NSMutableData * | incomingDataBuffer |
| int | packetBodySize |
| CFWriteStreamRef | writeStream |
| bool | writeStreamOpen |
| NSMutableData * | outgoingDataBuffer |
Properties | |
| id< ConnectionDelegate > | delegate |
| BOOL | resolved |
Used to make a connection between two peers.
| - (void) clean |
| - (void) close |
| - (BOOL) connect |
| - (NSString *) getHost |
| - (NSInteger) getPort |
| - (id) initWithHostAddress: | (NSString*) | host | |
| andPort: | (int) | port | |
| - (id) initWithNativeSocketHandle: | (CFSocketNativeHandle) | nativeSocketHandle |
| - (id) initWithNetService: | (NSNetService*) | netService |
| - (void) readFromStreamIntoIncomingBuffer |
| - (void) readStreamHandleEvent: | (CFStreamEventType) | event |
| - (void) sendNetworkPacket: | (NSDictionary*) | packet |
| - (BOOL) setupSocketStreams |
| - (void) writeOutgoingBufferToStream |
| - (void) writeStreamHandleEvent: | (CFStreamEventType) | event |
- (CFSocketNativeHandle) connectedSocketHandle [protected] |
- (NSString*) host [protected] |
- (NSMutableData*) incomingDataBuffer [protected] |
- (NSNetService*) netService [protected] |
- (NSMutableData*) outgoingDataBuffer [protected] |
- (int) packetBodySize [protected] |
- (int) port [protected] |
- (CFReadStreamRef) readStream [protected] |
- (bool) readStreamOpen [protected] |
- (CFWriteStreamRef) writeStream [protected] |
- (bool) writeStreamOpen [protected] |
- (id< ConnectionDelegate >) delegate [read, write, retain] |
- (BOOL) resolved [read, write, assign] |
1.7.2