Lines Matching defs:socket

140                     Socket socket = createSocket();
141 if (localAddress != null) socket.bind(localAddress);
142 socket.connect(new InetSocketAddress(hostAddresses[i], port));
143 return socket;
159 Socket socket = createSocket();
160 socket.bind(new InetSocketAddress(localAddress, localPort));
161 socket.connect(new InetSocketAddress(address, port));
162 return socket;
167 Socket socket = createSocket();
168 socket.connect(new InetSocketAddress(host, port));
169 return socket;
179 Socket socket = new Socket();
180 bindSocket(socket);
181 return socket;
300 * socket will be sent on this {@code Network}, irrespective of any process-wide network binding
301 * set by {@link ConnectivityManager#bindProcessToNetwork}. The socket must not be
304 public void bindSocket(DatagramSocket socket) throws IOException {
305 // Query a property of the underlying socket to ensure that the socket's file descriptor
307 socket.getReuseAddress();
308 bindSocket(socket.getFileDescriptor$());
312 * Binds the specified {@link Socket} to this {@code Network}. All data traffic on the socket
314 * {@link ConnectivityManager#bindProcessToNetwork}. The socket must not be connected.
316 public void bindSocket(Socket socket) throws IOException {
317 // Query a property of the underlying socket to ensure that the socket's file descriptor
319 socket.getReuseAddress();
320 bindSocket(socket.getFileDescriptor$());
325 * socket represented by this file descriptor will be sent on this {@code Network},
327 * {@link ConnectivityManager#bindProcessToNetwork}. The socket must not be connected.
334 // Apparently, the kernel doesn't update a connected UDP socket's
351 throw new ErrnoException("Binding socket to network " + netId, -err)