473,701 Members | 2,544 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 6142
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
13468
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
6200
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
4371
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
4895
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
6267
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
14090
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
2103
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
3155
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
8649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9225
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...
1
8977
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
8934
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...
1
6569
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4410
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3102
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2035
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.