             }
             return isSuccess
     }
-    public func send(str: String, flags: Int32 = 0, maxSize: Int = 1024) throws {
+	/// Sends a string to the peer.
+	///
+	/// This method adhers to the same requirements as the other, more advanced 
+	/// `sendTo(_:data:length:flags:maxSize:)` method. The socket must have had
+	/// it's address set, that is, if it's a connectionless socket, a call to `bind`
+	/// or `connect`, and if its a connection orientated socket, it must be connected
+	/// to a peer.
+	///
+	/// - parameters:
+	///		- str:			The string to send. It's length is decoded using the
+	///						NSUTF8StringEncoding interpretation.
+	///		- flags:		Controls additional parameters determining the 
+	///						behaviour of `send`.
+	///		- maxSize:		Specifies the maximum size of packets. If a buffer
+	///						exceeds this size, then it will be split into this size
+	///						until the whole buffer is sent (unless a failure occurs).
+	///	- Returns:
+	///						The number of bytes sent.
+	/// - Throws:
+	///		- `SocketError.SendToFailed`
+    public func send(str: String, flags: Int32 = 0, maxSize: Int = 1024) throws -> Int {
         let length = str.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)
-        try self.send(str, length: length, flags: flags, maxSize: maxSize)
-    }
-    /// Make sure that data is already base 64 encoded, this just uses 
-    /// data.bytes and data.length (whene data is NSData).
-    public func send(data: NSData, flags: Int32 = 0, maxSize: Int = 1024) throws {
+        return try self.send(str, length: length, flags: flags, maxSize: maxSize)
+    }
+
+	/// Sends `data` to the peer.
+	///
+	/// Allows the sending of data from the host to the peer. Attempting to send binary
+	/// data this way is not a good idea (unless the format is exactly the same on the
+	/// peer machine). It should instead be encoded, for example, by using base 64
+	/// encoding.
+	///
+	/// This method adhers to the same requirements as the other, more advanced 
+	/// function `sendTo(_:data:length:flags:maxSize:)`. The socket must have had its
+	/// address set, either by a call to `connect` or by a call to `bind`.
+	///
+	/// - parameters: 
+	///		- data:			The data to send.
+	///		- flags:		Provides additional control parameters for `send`.
+	///		- maxSize:		Specifies the maximum size of packets allow to be sent.
+	///						Buffers which exceed this value will be split into small
+	///						sizes, until the whole buffer is sent.
+	/// - Returns:
+	///						The number of bytes sent.
+	///	- Throws:
+	///		- `SocketError.SendToFailed`
+    public func send(data: NSData, flags: Int32 = 0, maxSize: Int = 1024) throws -> Int {
         let len = data.length
-        try self.send(data.bytes, length: len, flags: flags, maxSize: maxSize)
+        return try self.send(data.bytes, length: len, flags: flags, maxSize: maxSize)
     }
 }
 extension Socket {

    }
    
    deinit {
        // Clean up what the user didn't
        if !closed {
            do { try close() } catch {}
        }

    }
}
extension Socket {
	/// Sends `data` to the connected peer
	///
	/// Depending on the protocol, the socket must either be in a connected 
	/// state, or had a previous call to connect (or bind) to specify the
	/// communication address.
	///
	/// - parameters:
	///		- data:		A pointer to a buffer to send
	///		- length:	The length of the buffer (in bytes).
	///		- flags:	Control options for sending and recieving. 0 is the 
	///					default.
	///		- maxSize:	Specifies the maximum packet size when attempting to
	///					send large amounts of data. If, for example, length
	///					is twice the size of maxSize, then it will take two
	///					calls (internally) to send the data. Default is 1024.
	/// - Returns:
	///					The number of bytes sent.
	/// - Throws:
	///		- `SocketError.SendToFailed`
    public func send(data: UnsafePointer<Void>, length: Int, flags: Int32 = 0,
        maxSize: Int = 1024) throws -> Int {
			var data = data 
