ObjFW  Diff

Differences From Artifact [077e4589a5]:

To Artifact [e932bc199a]:


60
61
62
63
64
65
66




67
68
69
70


71
72
73
74
75
76


77
78
79
80
81


82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
60
61
62
63
64
65
66
67
68
69
70
71
72
73

74
75
76
77
78
79
80
81
82
83
84
85
86


87
88























89
90
91
92
93
94
95







+
+
+
+



-
+
+






+
+



-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-







 */
@protocol OFTCPSocketDelegate <OFStreamDelegate>
@optional
/*!
 * @brief A method which is called when a socket connected.
 *
 * @param socket The socket which connected
 * @param host The host connected to
 * @param port The port on the host connected to
 * @param exception An exception that occurred while connecting, or nil on
 *		    success
 */
-     (void)socket: (OF_KINDOF(OFTCPSocket *))socket
  didConnectToHost: (OFString *)host
	      port: (uint16_t)port;
	      port: (uint16_t)port
	 exception: (nullable id)exception;

/*!
 * @brief A method which is called when a socket accepted a connection.
 *
 * @param socket The socket which accepted the connection
 * @param acceptedSocket The socket which has been accepted
 * @param exception An exception that occurred while accepting, or nil on
 *		    success
 * @return A bool whether to accept the next incoming connection
 */
-    (bool)socket: (OF_KINDOF(OFTCPSocket *))socket
  didAcceptSocket: (OF_KINDOF(OFTCPSocket *))acceptedSocket;

  didAcceptSocket: (OF_KINDOF(OFTCPSocket *))acceptedSocket
	exception: (nullable id)exception;
/*!
 * @brief This method is called when an exception occurred during an
 *	  asynchronous connect.
 *
 * @param socket The socket for which an exception occurred
 * @param exception The exception which occurred for the stream
 * @param host The host to which the connection failed
 * @param port The port on the host to which the connection failed
 */
-		   (void)socket: (OF_KINDOF(OFTCPSocket *))socket
  didFailToConnectWithException: (id)exception
			   host: (OFString *)host
			   port: (uint16_t)port;

/*!
 * @brief This method is called when an exception occurred during an
 *	  asynchronous accept.
 *
 * @param socket The socket for which an exception occurred
 * @param exception The exception which occurred for the stream
 */
-		  (void)socket: (OF_KINDOF(OFTCPSocket *))socket
  didFailToAcceptWithException: (id)exception;
@end

/*!
 * @class OFTCPSocket OFTCPSocket.h ObjFW/OFTCPSocket.h
 *
 * @brief A class which provides methods to create and use TCP sockets.
 *