Category Archives: Java

Socket Programming in Java

Udp socket programming in Java

By | September 15, 2012

Datagram sockets UDP sockets can be used in java with the DatagramSocket class. Server Let code a simple udp server that listens on a certain port number. Run this program by typing the following at terminal/command line $ javac udp_server.java && java udp_server Server socket created. Waiting for incoming data… Now the udp server is… Read More »

Java socket programming tutorial

By | July 22, 2012

Socket programming in Java This is a quick guide/tutorial to learning socket programming in Java. The Socket class is documented at http://docs.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html To summarise the basics, sockets are the fundamental “things” behind any kind of network communications done by your computer. For example when you type www.google.com in your web browser, it opens a socket… Read More »