Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java problem: UDP client and server
Name: UnixNewbie Date: July 13, 2004 at 16:58:34 Pacific OS: Windows XP CPU/Ram: Pentium 4
Comment:
Hi, I was wondering if anybody could help me with this question? I have a UDP client and UDP Server program written in java and I was wondering:
I have to following line of code DatagramSocket clientSocket = new DatagramSocket();
if I change it to
DatagramSocket clientSocket = new DatagramSocket(5432);
in the UDPClient file will it be necessary to change the UDPServer file? This will effect the port numbers for the sockets in both files, right? Can anybody tell me how and what they were before?
I am very new to java, as a matter of fact this is my first try and I would appreaciate any help I can get.
yup, the client will have to be changed too. you'll need to set it to broadcast to that port, or the server will never recieve anything.
if the port where set, you probably would have seen a number in there before.. whoever wrote this, probably left it up to the user to set the port and/or address.
Summary: Hi computer friends, I have a big trouble to investigate. I need to find a UDP Client/Server implementation in Java language. I was able to write them in a single thread fashion but although I spend ...
Summary: I have a problem with a program that generates X numbers of numbers between 1 and 6. X is to be set by an user(Input). The problem is that the result is to be show'n in one JOptionMessageDialog with 5...
Summary: Look into Winsock component tutorials for visual basic. Determine a protocol, you will probably use TCP/IP or UDP in most cases. I've written chat applications in both protocols using VB6. You can pac...