468,513 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

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 7718
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Foord | last post: by
reply views Thread by Daniel Chandran | last post: by
1 post views Thread by Michael Goettsche | last post: by
7 posts views Thread by Tommy Naumann | last post: by
4 posts views Thread by Stimp | last post: by
reply views Thread by nitehawk416 | last post: by
6 posts views Thread by 7stud | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.