core java
-
Socket
Write text to Socket
In this example we shall show you how to write text to a Socket. To write text to a Socket one…
Read More » -
Socket
Read text from Socket
With this example we are going to demonstrate how to read text from a Socket. A Socket is an endpoint…
Read More » -
Socket
Send HTTP POST request with Socket
This is an example of how to send an HTTP POST request with a Socket. A socket is an endpoint…
Read More » -
Socket
Create client Socket with timeout
In this example we shall show you how to create a client Socket with timeout. A client socket is an…
Read More » -
Socket
Create client Socket
With this example we are going to demonstrate how to create a client Socket in Java. In short, to create…
Read More » -
InetAddress
Get hostname from IP address
This is an example of how to get the host name of a remote host from its IP address. Doing…
Read More » -
InetAddress
Get IP address and hostname from local machine
In this example we shall show you how to retrieve the IP address and hostname from the local host. To…
Read More » -
InetAddress
Get IP address from hostname
In this example we shall show you how to retrieve the IP address from the hostname of a specific host.…
Read More » -
DatagramPacket
Send network DatagramPacket
This is an example of how to send a Datagram packet over the network in Java. Sending Datagram packets between…
Read More » -
DatagramPacket
Receive network DatagramPacket
In this example we shall show you how to receive a Datagram packet in Java. For a host to receive…
Read More »