Fixed a couple of typos in the new connect documentation.

This commit is contained in:
Bill Abt
2017-08-06 10:21:51 -04:00
parent 19163ec97e
commit aa1fb2746d
+1 -1
View File
@@ -162,7 +162,7 @@ When a listening socket detects an incoming connection request, control is retur
### Connecting a socket to a server (TCP/UNIX).
In addition to the `create(connectedUsing:)` factory method described above, **BlueSocket** supports three additional instance functions for connecting a `Socket` instance to a server. They are:
- `connect(to host: String, port: Int32, timeout: UInt = 0)` - This API allows you to connect to a server based on the `hostname` and `port` you provide. Note: an `exception` will be thrown by this function if the value of `port` is not in the range `1-65535`. Optionally, you can set `timeout` to the number of milliseconds to wait for the connect. Note: If the socket is in blocking mode it will be changed to non-blocking mode temporarily if a timeout greater than zero (0) is provided. The returned socket will be set back to its original setting (blocking or non-blocking).
- `connect(to host: String, port: Int32, timeout: UInt = 0)` - This API allows you to connect to a server based on the `hostname` and `port` you provide. Note: an `exception` will be thrown by this function if the value of `port` is not in the range `1-65535`. Optionally, you can set `timeout` to the number of milliseconds to wait for the connect. Note: If the socket is in blocking mode it will be changed to non-blocking mode *temporarily* if a `timeout` greater than zero (0) is provided. The returned socket will be *set back to its original setting (blocking or non-blocking)*.
- `connect(to path: String)` - This API can only be used with the `.unix` protocol family. It allows you to connect to a server based on the `path` you provide.
- `connect(using signature: Signature)` - This API allows you specify the connection information by providing a `Socket.Signature` instance containing the information. Refer to `Socket.Signature` in *Socket.swift* for more information.