473,750 Members | 2,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB code to TELNET a port and get status

I need to write a VB program that can telnet to a TCP port and get the
status, whether connection succeeded or failed. Is there any API for
doing this ?

Thanks.
Jul 17 '05 #1
2 6145
I did something like this using a control (Think it was something like MS
comm control)

This allows you to create a connection to a specific host on a specific
port. I guess with suitabe error handling you could detect success (easy!)
or failure.

Dave

"Srini" <ao******@yahoo .com> wrote in message
news:e5******** *************** ***@posting.goo gle.com...
I need to write a VB program that can telnet to a TCP port and get the
status, whether connection succeeded or failed. Is there any API for
doing this ?

Thanks.

Jul 17 '05 #2
There's also the winsock API

--
Stéphane Richard
"Ada World" Webmaster
http://www.adaworld.com
"Bugsy" <do**********@b topenworld.comm y> wrote in message
news:bm******** **@titan.btinte rnet.com...
I did something like this using a control (Think it was something like MS
comm control)

This allows you to create a connection to a specific host on a specific
port. I guess with suitabe error handling you could detect success (easy!) or failure.

Dave

"Srini" <ao******@yahoo .com> wrote in message
news:e5******** *************** ***@posting.goo gle.com...
I need to write a VB program that can telnet to a TCP port and get the
status, whether connection succeeded or failed. Is there any API for
doing this ?

Thanks.


Jul 17 '05 #3

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

Similar topics

4
13470
by: Tom Lynn | last post by:
I'm considering using a PHP command line script to retrieve reports from a Linux system. My only source for the report is via telnet. Has anybody here used fsockopen() to interactively script a telnet session in PHP? If so, what problems did you have to overcome. If not, does this sound do-able?
5
6203
by: G520 | last post by:
Hi I have been getting statistical rapports from a machine via a telnet server. Until now it has been done manually. However I want to automate the proccess, and scedule a PHP script to run everyday. Using my terminal, I give the command to order a rapport, and then press <ESC>. Then the rapport is printed out.
8
4373
by: DCK | last post by:
Hello :) Into group-archive i found most e-mails, which touches PINGing. In my work i've used TELNET for testing if host is operational. Sometimes, for unknown reasons, workstation doesn't respond for PINGing. But in WinNT network, all hosts has a nbsession listening on port 139. I always use this script instead PING command (hope, will be usefull for someone :) ):
2
4901
by: Bruce W...1 | last post by:
I've got MySQL running as a service on my Windows 2000 box. And I can work with it using a command window (DOS box). I used the default install of MySQL and here's what status says: mysql> status -------------- mysql Ver 12.21 Distrib 4.0.15, for Win95/Win98 Connection id: 5 Current database:
2
6268
by: Zach Flynn | last post by:
Ok, so I'm programming in Unix if that makes any difference. And I'm doing: system("telnet somehost.com 25"); But I can't figure out how to send a command to it. Like, for example, I would like to send the helo command to the smpt port with this telnet open. Does anyone here know how to? Thanks. (kinda desired output)
7
14096
by: Rex Winn | last post by:
I've Googled until my eyes hurt looking for a way to issue Telnet commands from C# and cannot find anything but $300 libraries that encapsulate it for you. I don't want to be able to create a Telnet client. I just need to send a telnet request to a local IP address on a LAN issue a "c" then a "b" and stream back the text for internal use. The "c" changes sub-menus and the "b" is a switch to dump the status of a firewall. I need to issue...
2
1764
by: David Lozzi | last post by:
Howdy, I recently installed Visual Studio 2005 and I believe since then I cannot telnet to my local machine on port 25. Furthermore, my .net applications can no longer send emails through my local machine, or my server for that matter. I cannot telnet to any other mail servers on port 25, however I can telnet to my workstation from my server on port 25 with no problem. It appears something is denying a loopback or turn around? I don't...
1
2107
by: Jia Lu | last post by:
Hello I have a program that can telnet to a host. But I cannot understand from part, can anyone explain it to me? Thank you very much. import sys, posix, time
13
3159
by: Godzilla | last post by:
Hello, How do you create/spawn new processes in XP over telnet using python? I.e. I would like to create a new process and have it running in the background... when I terminate the telnet connection, I would what the spawned processes to keep running until I shut it off... I got the os.popen method to spawn a new process running in the backgroun, but not over telnet... tried os.popen and also subprocesses.popen without any luck...
0
9002
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9584
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9399
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9345
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9259
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8266
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6083
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2228
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.