Port range

  • Thread starter Thread starter marek.bakalarczuk
  • Start date Start date
M

marek.bakalarczuk

Hi!
I'm making LAN messenger program with priv messages.
I've made main interface for all LAN users and new window for priv
message.
Unfortunately I can't, I don't know how to program it to send multiple
priv messages
to few users simultanously (port range).
Main interface working on 8080 port and priv working on 8081.
I want to priv would work on range of ports, for ex. 8081 - 10000 or
something.
How to make it possible?

Regards and thanks,
Marek
 
i dont think that necessary. why not just have a "private message" class, and
when the user sends a message, put the message into a queue. have another
class handle the sockets that will poll the queue and while there is a
message in the queue, send the message to the recipient, which will be stored
in the message class. that way you wont be hogging all the ports.
 
I've made it in different way:
1. I've wrote a main "panel", where I list all LAN users
2. I've wrote for private message new window where I can generate
random port number range from 8080 to 10000
3. I've wrote for incoming message next new window wich can take
incoming message port and IP (I can test it because of lack of second
computer ;))

Points 1 and 2 are working :)
I must get second computer to test point 3

Regards,
Marek
 
you just have to be careful not to take up too many ports and consider that
other programs on the system may need those ports. try to use as few as
possible, usually it is one port for receiving and one for sending, then just
parse data from there....im still confused on why you would open multiple
ports to send data...
 
Back
Top