Socket Programming in Java
Udp socket programming in Java
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 up and waiting for incoming data. To check that udp server is really up, the netstat command can be used. [...]
Java socket programming tutorial
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 and connects to google.com to fetch the page and show it to you. Same with any chat client like gtalk [...]