Visual Basic Winsock senddata problem 
Author Message
 Visual Basic Winsock senddata problem


Quote:
> I am trying to build a news reader with Visual Basic
> my client connects to my news server and I get messages  from the
> server but when ever I try to use senddata I get an invalid protocol
> error, but when I check my protocol it is indeed tcp.... anyone have
> any Ideas'
>                                       Thanks
>                                              James


There are several things that could be causing it.

1. You may have to use the agSwapBytes funtion in the Windows API.
    You would use this API on the message you are going to send.
    Your news sever could be using a motorola processor and your PC is
     more than likely an Intel processor.  They somtimes have the bytes in
certian types
     of data in reverse order of each other. (hope that makes sense.)
     I have had this error my self and this was one solution.

2. Make sure your winsock control isn't in "listen" mode.  Check the
"state" property of the winsock control.
    If some how you are in "listen" mode you can't send messages.

I mess with winsock controls connecting to UNIX serves all the time...these
are just some of the problems I have encounterd.

Mark.



Tue, 08 Feb 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. winsock problem sending large strings (winsock.senddata)

2. winsock senddata problem/question

3. Winsock.SendData Problem

4. problem with winsock.senddata

5. VB6: Winsock senddata problem - help!

6. WInsock SendData problem HELP

7. Winsock TCP SendData problem

8. problem with WINSOCK.SENDDATA

9. Winsock SendData problems

10. Winsock SendData Problem?

11. Winsock SendData problem

12. senddata method problem in winsock control

 

 
Powered by phpBB® Forum Software