basic winsock client example?



 DEVELOP > c-Plus-Plus > basic winsock client example?

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "AdamMaynard24"
Date: 02 Sep 2006 06:21:21 PM
Object: 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.
.

User: "Jim Langston"

Title: Re: basic winsock client example? 01 Sep 2006 06:45:20 PM
"AdamMaynard24" <adammaynard24@hotmail.com> wrote in message
news:1157239281.408133.31180@p79g2000cwp.googlegroups.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.
.

User: "Thomas J. Gritzan"

Title: Re: basic winsock client example? 02 Sep 2006 06:35:36 PM
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-lite/how-to-post.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
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER