ObjFW
Loading...
Searching...
No Matches
<OFSCTPSocketDelegate> Protocol Reference

#include <ObjFW/ObjFW.h>

Inheritance diagram for <OFSCTPSocketDelegate>:
<OFSequencedPacketSocketDelegate> <OFObject>

Instance Methods

(void) - socket:didConnectToHost:port:exception:
 A method which is called when a socket connected.
 
(bool) - socket:didReceiveIntoBuffer:length:info:exception:
 This method is called when a message has been received.
 
(nullable OFData *) - socket:didSendData:info:exception:
 This method is called when a message has been sent.
 
- Instance Methods inherited from <OFSequencedPacketSocketDelegate>
(bool) - socket:didReceiveIntoBuffer:length:exception:
 This method is called when a packet has been received.
 
(nullable OFData *) - socket:didSendData:exception:
 This method is called when a packet has been sent.
 
(bool) - socket:didAcceptSocket:exception:
 A method which is called when a socket accepted a connection.
 
- Instance Methods inherited from <OFObject>
(Class) - class
 Returns the class of the object.
 
(nullable Class) - superclass
 Returns the superclass of the object.
 
(unsigned long) - hash
 Returns a hash for the object.
 
(unsigned int) - retainCount
 Returns the retain count.
 
(bool) - isProxy
 Returns whether the object is a proxy object.
 
(bool) - isKindOfClass:
 Returns a boolean whether the object is of the specified kind.
 
(bool) - isMemberOfClass:
 Returns a boolean whether the object is a member of the specified class.
 
(bool) - respondsToSelector:
 Returns a boolean whether the object responds to the specified selector.
 
(bool) - conformsToProtocol:
 Checks whether the object conforms to the specified protocol.
 
(nullable IMP- methodForSelector:
 Returns the implementation for the specified selector.
 
(nullable id) - performSelector:
 Performs the specified selector.
 
(nullable id) - performSelector:withObject:
 Performs the specified selector with the specified object.
 
(nullable id) - performSelector:withObject:withObject:
 Performs the specified selector with the specified objects.
 
(nullable id) - performSelector:withObject:withObject:withObject:
 Performs the specified selector with the specified objects.
 
(nullable id) - performSelector:withObject:withObject:withObject:withObject:
 Performs the specified selector with the specified objects.
 
(bool) - isEqual:
 Checks two objects for equality.
 
(instancetype) - retain
 Increases the retain count.
 
(void) - release
 Decreases the retain count.
 
(instancetype) - autorelease
 Adds the object to the topmost autorelease pool of the thread's autorelease pool stack.
 
(instancetype) - self
 Returns the receiver.
 
(bool) - allowsWeakReference
 Returns whether the object allows a weak reference.
 
(bool) - retainWeakReference
 Retain a weak reference to this object.
 

Detailed Description

A delegate for OFSCTPSocket.

Method Documentation

◆ socket:didConnectToHost:port:exception:

- (void) socket: (OFSCTPSocket *) socket
didConnectToHost: (OFString *) host
port: (uint16_t) port
exception: (nullable id) exception 
optional

A method which is called when a socket connected.

Parameters
socketThe socket which connected
hostThe host connected to
portThe port on the host connected to
exceptionAn exception that occurred while connecting, or nil on success

◆ socket:didReceiveIntoBuffer:length:info:exception:

- (bool) socket: (OFSCTPSocket *) socket
didReceiveIntoBuffer: (void *) buffer
length: (size_t) length
info: (nullable OFSCTPMessageInfo) info
exception: (nullable id) exception 
optionalrequired

This method is called when a message has been received.

Parameters
socketThe SCTP socket which received a message
bufferThe buffer the message has been written to
lengthThe length of the message
infoInformation about the message, see OFSCTPMessageInfo
exceptionAn exception that occurred while receiving, or nil on success
Returns
A bool whether the same handler should be used for the next receive

◆ socket:didSendData:info:exception:

- (nullable OFData *) socket: (OFSCTPSocket *) socket
didSendData: (OFData *) data
info: (nullable OFSCTPMessageInfo) info
exception: (nullable id) exception 
optionalrequired

This method is called when a message has been sent.

Parameters
socketThe SCTP socket which sent a message
dataThe data which was sent
infoInformation about the message, see OFSCTPMessageInfo
exceptionAn exception that occurred while sending, or nil on success
Returns
The data to repeat the send with or nil if it should not repeat

The documentation for this protocol was generated from the following file: