473,385 Members | 1,766 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,385 software developers and data experts.

How to check for port response

I understand how easy it is to use the my.computer.network.ping command, but
is it as easy to check for a response on a given port?

How can I check for a response for port x at 123.456.789?
Dec 31 '05 #1
1 6235

for response ?


if you mean to check if a port is open or not
Imports System.Net.Sockets

Private Function TCP_Port_Open(ByVal ip As String, ByVal port As Integer) As
Boolean

Dim TcpPortscan As New TcpClient

Try

'Try to connect

TcpPortscan.Connect(ip, port)

' we are still here :-) so this port is asumed open

Return True

Finally

TcpPortscan.Close()

End Try

End Function

regards

Michel Posseth [MCP]

"Marty Cruise" <Ma*********@discussions.microsoft.com> wrote in message
news:3E**********************************@microsof t.com...
I understand how easy it is to use the my.computer.network.ping command,
but
is it as easy to check for a response on a given port?

How can I check for a response for port x at 123.456.789?

Dec 31 '05 #2

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

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
1
by: Mike | last post by:
Sorry, don't know if this is the correct board for my question. I'm a novice so I guess I have a valid excuse My question : I'm using Visual C++ and I need to collect data from a serial port. ...
1
by: Sean Wolfe | last post by:
I have this wierd bizarrre problem that I'm experienceing with the Response.Redirect() method. I have a site where the users are on a particular page in SSL. When they post the data back, and...
9
by: xparrot1 | last post by:
I know that I can get the SERVER port number like this: HttpContext.Current.Request.ServerVariables My question is how do I get the remote CLIENT port number? Thanks Derek
2
by: NoOne | last post by:
Hi everybody! I'm want to check if a certain port is opened or closed. now I'm using try-catch to connect to the port. if it fails, it meas that the port is closed. The problem is that this...
5
by: Maciej Sondej | last post by:
Hi, I have problem. I want to react on event which come from IO.Port(RS232). I have a class that works on console application class Program { static void Main(string args) {
4
by: Sir C4 | last post by:
Can someone give a quick example of how to check for activity on a TCP port? For example, I'd like to watch and listen for activity on port 80. Once activity is detected, I'd like an event to be...
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...
3
by: ZAAN | last post by:
Hi, I'm developing an application in PHP5, which interacts with another system written in Delphi (of another company). I've prepared the Web Service - WSDL, Client and Server (only stub) side....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.