View RSS Feed

Java Socket

Socket programming and networking examples in Java.

  1. What Is a Socket?

    by , 04-25-2012 at 10:13 PM
    At some specific computer, server usually runs. It consists of a socket which remains bound to some particular port number. Server’s function is to hold or wait and listen to socket if some client sends the connection request.

    On the client-side: Client is aware of the machine at which server runs has a hostname and a port number at which server listens. Client makes an attempt at the machine and port of the server to rendezvous with server so that to make the connection request. ...
  2. What are Sockets and Threads?

    by , 04-25-2012 at 10:11 PM
    Socket is basically the software endpoint which creates a bi-directional communication b/w client programs & a server program. A server program is associated by the socket with specific hardware port present at machine at which it runs and client program present in network along with socket which is being associated to similar port might do communication with server program.

    Resource is provided by a server program to the client program network. Requests are sent by the client ...
  3. Java Sockets

    by , 01-08-2012 at 12:21 PM
    Sockets provided communication channeled and support inter process communication in Java. For example to communicate between two JVMs, sockets are used. Socket is an end point for communication. There are two types of sockets.

    • Connection less sockets
    • Connection oriented sockets

    UDP protocol is used in the connection less sockets communication. Also they are referred as datagram communication protocol.

    Each socket is indentified with following ...
    Tags: java sockets Add / Edit Tags
  4. How to send HTTP request to a URL

    by , 12-09-2011 at 07:28 AM
    Sometimes an application needs to communicate to a web server to send/receive data through HTTP. For example, connecting to a financial service to get stock price, posting user data to server to save in database, or checking for a new version of an application if available.

    This article will guide you to write a generic utility method that can connect to a specified URL with either HTTP’s GET/POST method, and attaching parameters to the request. The method will return server’s response ...
    Tags: http, java, post, request, url Add / Edit Tags
    HTTP , URL
Page 2 of 2 FirstFirst 12