Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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()));
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!