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

basic winsock client example?

Can someone give me an example of a basic telnet client that can send
and receive data using WSAAsyncSelect().. to get a notification?

I've come up with something, but it doesn't quite function. Using
Send(), i'm not getting any errors and i'm attaching a CRLF on to the
end of each line, but apart from the inital FD_READ notification when I
connect to a telnet server, I don't get a FD_READ after I send
something, which when I connect to the same server with telnet, and
send the same string, the telnet server will send back a load of text.
Actually, it doesn't matter what text you send to the test telnet
server (a MUD), it will send back the same info. So I'm connecting
fine, the FD_READ seems to be working fine, because it fires when I
connect, then when I send(), no errors - the FD_READ does not fire, so
I can't do anything about the incoming data.

Thanks.

Sep 2 '06 #1
2 8040
AdamMaynard24 schrieb:
Can someone give me an example of a basic telnet client that can send
and receive data using WSAAsyncSelect().. to get a notification?
Someone can. In a windows programming newsgroup maybe. Look here:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

This is a C++ language group and the C++ language has no network stuff.

--
Thomas
http://www.netmeister.org/news/learn2quote.html
Sep 2 '06 #2
"AdamMaynard24" <ad***********@hotmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Can someone give me an example of a basic telnet client that can send
and receive data using WSAAsyncSelect().. to get a notification?

I've come up with something, but it doesn't quite function. Using
Send(), i'm not getting any errors and i'm attaching a CRLF on to the
end of each line, but apart from the inital FD_READ notification when I
connect to a telnet server, I don't get a FD_READ after I send
something, which when I connect to the same server with telnet, and
send the same string, the telnet server will send back a load of text.
Actually, it doesn't matter what text you send to the test telnet
server (a MUD), it will send back the same info. So I'm connecting
fine, the FD_READ seems to be working fine, because it fires when I
connect, then when I send(), no errors - the FD_READ does not fire, so
I can't do anything about the incoming data.

Thanks.
Make sure you are sending a carriage return '\n' at the end of your
transmission. It may just be that you aren't terminating the send with the
carriage return and the telnet server is still waiting for it.
Sep 2 '06 #3

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

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: Daniel Chandran | last post by:
I am looking for examples on how to write a Socks-4 client example using the Twisted framework. Has anybody attempted this or aware of examples? Thanks, Daniel
1
by: Michael Goettsche | last post by:
Hi there, I'm trying to write a simple server/client example. The client should be able to send text to the server and the server should distribute the text to all connected clients. However, it...
7
by: Tommy Naumann | last post by:
Does anyone know of an example of how to write an FTP client in Visual Basic.net? I'm trying to automate FTP file uploads and downloads in VB. Thanks in Advance Tommy
5
by: jason | last post by:
While I wait for my books to arrive.. anticipating the RTFM responses... I am trying to understand the C# code below. The code is suppose to be scraping stoke quote info off the MSN site. To help...
4
by: Stimp | last post by:
Hi all, I'm trying to read a particular node value from an XML file, but I've done some searching on the net and there doesn't seem to be a very basic example. Basically here's what I want to...
0
by: nitehawk416 | last post by:
I'm building a mud client, it connects through the winsock control to the server, and it gets the data, sends it back and displays it in a rich text box. I need a way to display the ansi colors that...
0
by: danishce | last post by:
Hello All: I am developing a client/server application using vb.net winsock programming. I am sending data to Server and at the same time receive the incoming data from the server. My application...
6
by: 7stud | last post by:
My question pertains to this example: #!/usr/bin/env python import socket, sys, time host = sys.argv textport = sys.argv s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.