View RSS Feed

Recent Blogs Posts

  1. Client Sockets

    by , 04-25-2012 at 10:18 PM
    Client sockets are handled by a class which is in java.net package. This line would be included generally;
    import java.net.Socket;

    So that package methodís short names could be used. Number of constructors could be used for creation of new [client] socket. This depends upon the specific circumstances. Simplest one is:
    Java Code:
     Socket(String host, int port)
    that connects to machine hostís port. For example,
    Java Code:
    Socket s = new Socket("this.doesnt.exist.com",
    ...
    Categories
    Tutorial