-
January 21st, 2008, 03:18 PM
#1
Counting Overhead On A Socket
I want to include some built-in performance monitoring in my Winsock-based server program. I can easily keep track of the number of bytes that I send through Winsock functions, but I'm also interested in keeping track of how many bytes are sent out over the network. The difference is that the number of bytes sent out over the network will include the TCP/IP protocol header. This way I can see what sort of overhead I'm experiencing, which may be significant for my application.
Is there an easy way to get how many bytes have been sent over a socket, including all protocol headers or other overhead?
-
January 21st, 2008, 07:55 PM
#2
Re: Counting Overhead On A Socket
you can use ethereal tool get the bytes over your network card and if you are using TCP protocol,TCP protocol header size plus IP protocol header size should be 54 bytes.please refer to TCP/IP book,you can get TCP protocol or IP protocol header size.
Best,
Kevin Jo
http://www.upredsun.com
**Easily and automatically build tcp-based or udp-based network protocol source code**
-
January 22nd, 2008, 01:54 PM
#3
Re: Counting Overhead On A Socket
I was hoping for a way of doing this in my program rather than using an external program, but as far as I know there's no way for my program to know how many packets winsock sends as a result of me sending data through my sockets.
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
|