Search results
This class implements client sockets (also called just "sockets"). A socket is an endpoint for communication between two machines. The actual work of the socket is performed by an instance of the SocketImpl class.
- Use
Creates a server mode Socket layered over an existing...
- SocketImplFactory
This interface defines a factory for socket implementations....
- SocketImpl
Places the input stream for this socket at "end of stream"....
- SocketException
Constructs a new SocketException with the specified detail...
- SocketAddress
This class represents a Socket Address with no protocol...
- SocketTimeoutException
Signals that a timeout has occurred on a socket read or...
- ProxySelector
Selects the proxy server to use, if any, when connecting to...
- Proxy
Compares this object against the specified object. The...
- Use
A socket is one end-point of a two-way communication link between two programs running on the network. Socket classes are used to represent the connection between a client program and a server program.
A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to.
What are Sockets and Threads? A socket is a software endpoint that establishes bidirectional communication between a server program and one or more client programs.
This class implements server sockets. A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester. The actual work of the server socket is performed by an instance of the SocketImpl class.
Reading from and Writing to a Socket. Let's look at a simple example that illustrates how a program can establish a connection to a server program using the Socket class and then, how the client can send data to and receive data from the server through the socket. The example program implements a client, EchoClient, that connects to an echo server.
It needs a new socket so that it can continue to listen to the original socket for connection requests when the attention needs for the connected client. Here's an overview of how to create the simple server program: Create and open a server socket. Wait for the client request.