Full width home advertisement

Post Page Advertisement [Top]

How to set time while connecting  using socket with provided IP Address


/*
Import these files:

import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.ServerSocket;

*/

public void connect(String IPAddress,int port,int timeOut) throws Exception
{
SocketAddress sa=InetSocketAddress(IPAddress,port);
Socket s=new Socket();
s.connect(sa,timeOut);
}

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib