Google Search

Sunday, October 30, 2011

CLIENT SERVER INTRACTION (TCP)


CLIENT SERVER INTRACTION (TCP)

THEORY:

TCP/IP Client Sockets

The two constructors used to create client sockets:
Socket(String hostName,int  port):
It creates a socket connecting the local host to the named host and port. It can also         throws an UnknownHostException or an IOException

Socket(InetAddress ipAdress,int port)
It creates a socket using a preexisting InetAddress object and a port.It can throw an
IOException

                      static InetAddress getLocalHost()
                        throws UnknownHostException

The getLocalHost() method simply returns the InetAddress object that represents
 the local host.

ALGO:

0 comments:

Post a Comment