-
January 29th, 2009, 01:20 PM
#1
[RESOLVED] tcp send() problem
Hello all,
The code below connects to a tcp server I have running on my local machine and attempts to send a test message. For some reason the server never seemed to be getting the message so I ran Wireshark to see if it was being sent, but I can not see it. Maybe it doesnt show up on Wireshark if the server and client are both running on 127.0.0.1? Any idea what might be wrong with my tcp client code? I am not getting any errors from the system calls.. the connect() and send() seem to be working.. Anyone have any ideas?
Thanks!
Last edited by lab1; January 29th, 2009 at 03:13 PM.
-
January 29th, 2009, 01:39 PM
#2
Re: tcp send() problem
I don't know about the code, but if you are using the loopback adapter (127.0.0.1), the packets will never actually leave your machine. IIRC, even if you use your own IP address, the network stack is smart enough to realize that it doesn't actually need to send the packets to the physical media (card; wire).
Viggy
-
January 29th, 2009, 09:42 PM
#3
Re: [RESOLVED] tcp send() problem
If you want to sniff your local machine (without using the network), you have the select the "lo" (or loop back) interface in Wireshack.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|