protected void connect ( InetAddress address , int port ) throws SocketException { BlockGuard . getThreadPolicy ( ) . onNetwork ( ) ; connect0 ( address , port ) ; connectedAddress = address ; connectedPort = port ; connected = true ; }
Connects a datagram socket to a remote destination . This associates the remote address with the local socket so that datagrams may only be sent to this destination and received from this destination .