CLIENT SERVER INTRACTION (TCP) - C C++ Java Programs - Examples

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

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:

No comments:

Post a Comment