         
         self.handler = handler
         
-        createSocket()
+        si_host = sockaddr_in(
+            sin_len:    __uint8_t(MemoryLayout<sockaddr_in>.size),
+            sin_family: sa_family_t(AF_INET),
+            sin_port:   UDPBroadcastConnection.htonsPort(port: port),
+            sin_addr:   INADDR_ANY,
+            sin_zero:   ( 0, 0, 0, 0, 0, 0, 0, 0 )
+        )
+        
+        createSocket2()
     }
     
     deinit {

        let UDPSocket = Int32(source.handle)
        message.withCString { broadcastMessage in
            
            let len = address.sin_len
            
            let broadcastMessageLength = Int(strlen(broadcastMessage) + 1) // We need to include the 0 byte to terminate the C-String
            let sent = withUnsafePointer(to: &address) {
                sendto(UDPSocket, broadcastMessage, broadcastMessageLength, 0, UnsafeRawPointer($0).bindMemory(to: sockaddr.self, capacity: 1), socklen_t(len))
            }
            

    
    /// The address of the UDP socket.
    var address: sockaddr_in
    var si_host: sockaddr_in
    
    /// Closure that handles incoming UDP packets.
    var handler: ((_ ipAddress: String, _ port: Int, _ response: [UInt8]) -> Void)?
