How do I resolve the “java.net.BindException: Address already in use: JVM_Bind” error?

Yes you have another process bound to the same port. TCPView (Windows only) from Windows Sysinternals is my favorite app whenever I have a JVM_BIND error. It shows which processes are listening on which port. It also provides a convenient context menu to either kill the process or close the connection that is getting in the way.

Will setting a multicast destination address to FFFF.FFFF.FFFF make it a broadcast?

I’m working with a device that sends out UDP packets on a multicast address, however I see some packets addressed to the multicast group IP with a MAC address of FFFF.FFFF.FFFF. From what I’ve read my best guess is that this is an attempt to do a network wide broadcast from the multicast group. Here’s … Read more

Networking with C++

Given your newness to C++, I would not recommend building directly on the sockets APIs unless you can find no suitable library to use. Boost.Asio will give you a huge head start and expose you to the higher-level abstractions used in network programming. It’s easy when starting out building a sockets-based system to get something that ‘sort … Read more

Connect: Socket operation on non-socket

I see the problem. It’s this line: The == operator has precedence over the = operator. Look at the way you have the parentheses structured on that expression a bit more carefully to see what I mean. sockfd is getting initialize to “0” as a result of being assigned a boolean expression (socket(…) == -1). … Read more

Connect: Socket operation on non-socket

I see the problem. It’s this line: The == operator has precedence over the = operator. Look at the way you have the parentheses structured on that expression a bit more carefully to see what I mean. sockfd is getting initialize to “0” as a result of being assigned a boolean expression (socket(…) == -1). … Read more