|
How to find available COM ports in my PC? I am using framework v1.1. Is it possible to find all COM ports? If possible, help me solve the problem.
Started by RV on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
An exception occurs if the port is already in use" & lIdx lCount = lCount + ....
In later versions the Serial Port support is available through the System.IO.Ports name space the port names and then try opening a connection.
|
|
Is there a more elegant way of checking if a TCP port is available with Delphi other than catching a netstat call?
Started by Mattl on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I guess other indy components can tell if a port is open or not,....
So basically you could create such component, bind it ) then the port is probably in use, else it is free.
An exception if a port is in use when it is being opened.
|
|
Suppose I want to run a TCP/IP service on some port for IPC. As I'm passing the port number to the processes I want to communicate with anyway, the port number doesn't matter. What's the best way to get a random, high (usually >49152) port number that...
Started by greg on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If you don't specify a port number the OS will pick automatically an ephemeral ....
The only way is to loop through the desired port range, attempting to bind a socket to each port one at a time until you find one that is successful.
|
Ask your Facebook Friends
|
I have some legacy code that provides a list of the available COM ports on the PC by calling the EnumPorts() function and then filtering for the port names that start with "COM".
For testing purposes it would be very useful if I could use this code with...
Started by GrahamS on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If the port is not installed, you'll get a file not....
If the port is in use, you'll get a sharing error.
If the port is available, the open will work.
You can make loop for example from 1 to 50 and try to open each port.
|
|
In C# to use a TcpClient or generally to connect to a socket how can I first check if a certain port is free on my machine?
more info: This is the code I use:
TcpClient c; //I want to check here if port is free. c = new TcpClient(ip, port);
Started by Ali on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
You don't have to know what ports are open on your....
The TcpClient selects a transient local port from the available? If it fails then you know the port is not available.
And server port you wish to connect to.
|
|
I need an app that sends an UDP packet to some network server and receives the response. The server replies to the same port number where request came from, so I first need to bind() my socket to any UDP port number.
Hardcoding the UDP port number is ...
Started by Soonts on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Another option is to specify port 0) while still using a random port.
Call sendto without calling bind first, the socket will be bound automatically (to a free port the data was sent, right there for you to send a response back.
|
|
Hi, I am doing direct I/O on a parallel port which is fine and necessary for speed. I would like to enumerate the available ports to offer the user a choice of ports at setup time rather than a tedious trawl through device manager to read the address ...
Started by Brian Frost on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Brian..
Many thanks Scott, I'll investigate.
According to this Microsoft article , for Win2K and newer, you can find details of parallel-connected devices in the registry at HKLM\SYSTEM\CurrentControlSet\Enum\LPTENUM .
|
|
I have an application where I have potentially many processes must send a message to one process. I figured the most expedient way to do this would be to just send a UDP datagram.
When opening a socket, I need to specify which port to listen to. As I ...
Started by Matthias Wandel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The OS will pick an available port for you..
Specify 0 as the port.
Between your processes.
|
|
How can i find out this information?
Ie,
I can install boost 1.35 with a command like
sudo port install boost
only to get boost 1.36 via port i would do something like this?
sudo port install boost-1.36
Hope that clears up my question
Started by Setori on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
OS X available for OS X: http://www.boost.org/users/download/version_1_36_0
Not sure exactly what you're it might be available.....
That depends on what package manager you're using.
It is, therefore, available now.
Including Macs).
|
|
Something that will run in background and alert me on mail if some ip is port scanning the server.
Started by daniels on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
The problem with 'detecting' port....
If this server.
Portsentry a greater purpose, portsentry is designed to take an action specific to port scans.
That can autoblock anyone running a port scan.
Like psad that is based on iptables.
|