java Programming Glossary: inetsocketaddress
Java TCP socket: data transfer is slow http://stackoverflow.com/questions/1169739/java-tcp-socket-data-transfer-is-slow Socket initialSock new Socket initialSock.connect new InetSocketAddress serverAddr LDAMaster.LDA_MASTER_PORT int newPort LDAHelper.readConnectionForwardPacket.. sock.setSendBufferSize SEND_BUFFER_SIZE sock.connect new InetSocketAddress serverAddr newPort System.out.println Connected to hostname.. SO_TIMEOUT servSock.setReuseAddress true servSock.bind new InetSocketAddress LDA_MASTER_PORT int currPort LDA_START_PORT while true try Socket..
Embedded HTTP server in Swing Java app http://stackoverflow.com/questions/1186328/embedded-http-server-in-swing-java-app import java.io.OutputStream import java.net.InetSocketAddress import java.util.Iterator import java.util.List import java.util.Set.. public static void main String args throws IOException InetSocketAddress addr new InetSocketAddress 8080 HttpServer server HttpServer.create.. String args throws IOException InetSocketAddress addr new InetSocketAddress 8080 HttpServer server HttpServer.create addr 0 server.createContext..
How to send and receive serialized object in socket channel http://stackoverflow.com/questions/1453028/how-to-send-and-receive-serialized-object-in-socket-channel import java.io.ObjectOutputStream import java.net.InetSocketAddress import java.nio.channels.ServerSocketChannel import java.nio.channels.SocketChannel.. true int port 12345 ssChannel.socket .bind new InetSocketAddress port String obj testtext while true SocketChannel sChannel ssChannel.accept.. import java.io.ObjectInputStream import java.net.InetSocketAddress import java.nio.channels.SocketChannel public class Receiver..
android open socket and send commands http://stackoverflow.com/questions/2132241/android-open-socket-and-send-commands example using DatagramSockets String cmd my command try InetSocketAddress address new InetSocketAddress 10.1.1.1 12350 DatagramPacket.. String cmd my command try InetSocketAddress address new InetSocketAddress 10.1.1.1 12350 DatagramPacket request new DatagramPacket cmd.getBytes..
simple HTTP server in Java using only Java SE API http://stackoverflow.com/questions/3732109/simple-http-server-in-java-using-only-java-se-api import java.io.OutputStream import java.net.InetSocketAddress import com.sun.net.httpserver.HttpExchange import com.sun.net.httpserver.HttpHandler.. throws Exception HttpServer server HttpServer.create new InetSocketAddress 8000 0 server.createContext test new MyHandler server.setExecutor..
Setting JVM/JRE to use Windows Proxy Automatically http://stackoverflow.com/questions/376101/setting-jvm-jre-to-use-windows-proxy-automatically iter.next System.out.println proxy hostname proxy.type InetSocketAddress addr InetSocketAddress proxy.address if addr null System.out.println.. proxy hostname proxy.type InetSocketAddress addr InetSocketAddress proxy.address if addr null System.out.println No Proxy else..
Set timeout for socket http://stackoverflow.com/questions/4969760/set-timeout-for-socket something like Socket socket new Socket socket.connect new InetSocketAddress ipAddress port 1000 Quoting from the documentation connect public..
Using Apache httpclient for https http://stackoverflow.com/questions/5206010/using-apache-httpclient-for-https .getSchemeRegistry .register https InetSocketAddress address localServer.getServiceAddress HttpHost target1 new HttpHost..
Where to stop/destroy threads in Android Service class? http://stackoverflow.com/questions/680180/where-to-stop-destroy-threads-in-android-service-class new Socket socket.setTcpNoDelay true socket.connect new InetSocketAddress serverAddress portNumber 3000 socket.connect new InetSocketAddress.. serverAddress portNumber 3000 socket.connect new InetSocketAddress serverAddress portNumber if socket.isConnected throw new Exception..
Java: Why does SSL handshake give 'Could not generate DH keypair' exception? http://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception sslContext.getSocketFactory .createSocket s.connect new InetSocketAddress host port timeout s.setSoTimeout 0 SSLSocket s .startHandshake..
Java 7 language features with Android http://stackoverflow.com/questions/7153989/java-7-language-features-with-android .methodModifiers NetworkInterface .getIndex .getByIndex InetSocketAddress .getHostString InetAddress .getLoopbackAddress Logger .getGlobal..
How does the Netty threading model work in the case of many client connections? http://stackoverflow.com/questions/7895964/how-does-the-netty-threading-model-work-in-the-case-of-many-client-connections factory2 ChannelFuture future bootstrap.connect new InetSocketAddress host port future.addListener new ChannelFutureListener @Override..
how to check whether a port is open at client's network/firewall (solved) http://stackoverflow.com/questions/8937158/how-to-check-whether-a-port-is-open-at-clients-network-firewall-solved import java.awt.Graphics import java.net.InetSocketAddress import java.net.Socket public class ConnectionTestApplet extends.. it with url http 101.220.25.76 1935 socket.connect new InetSocketAddress 101.220.25.76 1935 delay portAvailable socket.isConnected socket.close..
How can I specify the local address on a java.net.URLConnection? http://stackoverflow.com/questions/91678/how-can-i-specify-the-local-address-on-a-java-net-urlconnection yourUrlHere Proxy proxy new Proxy Proxy.Type.DIRECT new InetSocketAddress InetAddress.getByAddress new byte your ip interface here yourTcpPortHere..
|