473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Port range

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

Aug 28 '07 #1
3 1090
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.
--
-iwdu15
Aug 28 '07 #2
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

Aug 29 '07 #3
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...
--
-iwdu15
Aug 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. ...
5
by: Jason | last post by:
After a server accepts a client connection on a certain port, a new socket is created on the server on a system managed dynamic port to handle the connection. Please confirm this. If so, how...
3
by: Keith | last post by:
Quick question on port numbers (V8.1 or V8.2): Is it true that on HP11, db2icrt command ignores -p option for port (Non DPF)? Does DB2 always take 60000 (assuming this is the first instance), ...
3
by: Franky | last post by:
I need to specify a range of outgoing port numbers (i.e., 20000-21000). Is there any way to bind this range so that when system picks up a free port, it will only pick one from this range? I know I...
1
by: Nathan Young | last post by:
Hello. I have a .net application that utilizes COM ports to communicate with serial devices (namely a GPS). This may not be the right group for this question, but bear with me as I am not sure...
12
by: david.brown.0 | last post by:
I'm trying to make a Java program access a parallel port. Java's comm API does not provide me with the control I need. I need to be able to write to the data and control pins and read the status...
25
by: bmearns | last post by:
Is it possible to specify which port to use as the outbound port on a connection? I have the IP address and port number for the computer I'm trying to connect to (not listening for), but it's...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
3
by: TC | last post by:
Hey All, I have some classes that I recently built for a website which uses the HttpWebRequest & HttpWebResponse objects from the System.Net namespace. Basically, the classes rap submitted data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.