Link to home
Start Free TrialLog in
Avatar of blueskies77
blueskies77

asked on

Winsock error 40006 when sending data

Hi,

i've got a vb application that does chat. however when sending a message out from a remote client to remote client I get the error 40006.

when i chat from client running on the server PC to my remote client i can talk no worries, but when its me and another remote client talking together we get that error. we have both disabled our firewalls and forwarded the relevant port (even tried port forwarding all ports), but the same problem still occurs.

I noticed when debugging on my local client, the client thinks my friends client ip is 192.168.x.x. which is of course a local IP.  But I cant figure out why that is....

Any ideas?

heres the code in question, which is executed on the client after user types in message and clicks Send button.

    If (remote_window_closed = False) Then
        tx = mainform.Text1.Text & " : " & typeTxt.Text
        ChatWsk.SendData tx
        typeTxt.Text = ""
    Else
Avatar of r_a_j_e_s_h
r_a_j_e_s_h

Avatar of blueskies77

ASKER

will keep following it, nothing yet to help me though...

anyone else please help?
ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Tomlinson
Hi blueskies77,

Show us the code that connects the client to the server.

Often times for developing purposes we hard code the IP and then forget to change it:

Private Sub Form_Load()
    Me.Caption = "Client - Connecting..."
    IP = "127.0.0.1"
    port = 10001
   
    ' attemp to connect to the server
    Winsock1.Connect IP, port
End Sub
>>Venabili

Sorry, duly noted.
BigRat,

It's ok:)

PS: Your recommendation here? Cheese for BigRat is clear, split probbably with Idle_Mind... Although I am still wondering for the split... Your thoughts?
>>Your thoughts?

Well, that's the standard solution to the standard problem which I copied out of my Developer Search tool (I'm a Universal Subscriber to MSDN which is why I didn't have a web link).

This question is obviously a follow up to https://www.experts-exchange.com/questions/21348178/using-Winsock-with-post-response-http-commands.html which will also be classified as abandoned on Thursday (Rat's birthday so I won't be here!)