473,407 Members | 2,546 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,407 software developers and data experts.

Detecting already used port

I came up with this piece of code to see if the port is being used right
now. I'm wondering if there is more elegant way of detecting already used
port.

try

{

System.Net.IPAddress Addr = Dns.Resolve("localhost").AddressList[0];

m_TcpListener2 = new TcpListener(Addr, 80);

m_TcpListener2.Start();

MessageBox.Show("Cool");

}

catch (Exception exp)

{

MessageBox.Show(exp.Message);

}
Nov 15 '05 #1
0 877

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

Similar topics

7
by: Joecx | last post by:
Hi Does anyone have the code or maybe give me a start on how to detect if my program is already running if someone tries to run it again while it's already running? I know I could do this with a...
2
by: Aleksander Wodynski | last post by:
I have server, daemon and client (daemon and client on the same machine). When client starts it send query to the server, server send query to the deamon (daemon check if the client exist), daemon...
7
by: kstahl | last post by:
Howdy, I would like to get down to the nitty-gritty of the keyboard's operation. Specifically, I would like to poll only a few keys on the keyboard, and I would like to know when more than one...
5
by: Brian Henry | last post by:
Hi, I have a web site i want to be SSL (we already have the cert and everything from verisign) but i want port 80 to redirect to the ssl connection 443 (HTTPS) so if they go to the site at...
5
by: bill ramsay | last post by:
Hi I wonder if anyone can help me with a problem that I have with MSDE SQL db. . I have an app that runs on a server that communicates with remote devices using email, this and other similar...
1
by: Przemek M. Zawada | last post by:
Dear Group, I have got two mice connected to one PC (notebook). In example I click parallel left button on mouse A and left button on mouse B. Is it possible, programmatically detect which on...
4
by: setiarakesh | last post by:
I have designed a socket Server and developed asynchronous server . It is working fine with 60 Clients which are connecting to ths Server running at Machine (2 GB RAM and OS is Windows 2003...
1
by: rajeshrocks2006 | last post by:
Hi, i need help in detecting usb port in a network and have to provide authentication for the USB port for the system security purposes...plzz help me....
4
by: gnomeom | last post by:
I am facing a huge problem can any one please help me. I Install Php version 6. And Wamp server too. My wamp server is running in half mode.That means only one service is started.The one service...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.