Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Datagram Communication  RSS feed

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you write the following program using datagram communication implementation:

public class client {
public static void main(String [] args) throws IOException{
Socket sock = new Socket (InetAddress.getLocalHost(),2000);
BufferedWriter dataout;
String Message = "Hello";
system.out.println("Sending" + Message+ "....");
dataout = new BufferedWriter(new OutputStreamWriter(sock.getOutputSream()));
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!