473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Monitor a socket port

Is there a way to monitor the amount of data that is sent/received over one
port on a socket? I don't care about the data just the number of bytes.

Regards,
John
Feb 8 '06 #1
5 3481
Depends.
If you want to monitor port over which you are sending / receiving data ,
it's relatively simple. Just count bytes.

If you want monitor port connected with other process you can google about
WinpCap
It comes with handy documentation.
Feb 9 '06 #2
Hello, John!

JJH> Is there a way to monitor the amount of data that is sent/received
JJH> over one port on a socket? I don't care about the data just the
JJH> number of bytes.

AFAIK to know this you have to write unmanaged software called LSP ( Layered Service Provider ) that will collect traffic data for specific port. LSP is only for sockets, if you want all data from non-socket communications you have to use/write kernel-mode driver.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 9 '06 #3
Well I wrote the program so in concept yes I can just count bytes. The
problem is I start a thread for each socket handle on the port and would
like the cumulative count port rather then the count for the handle on one
thread. I was sort of hoping for an overload of the byte received/sent for
the port.

Thanks for the program name.

Regards,
John

"PiotrKolodziej" <pi*************@gmail.com> wrote in message
news:18*************************@news.chello.pl...
Depends.
If you want to monitor port over which you are sending / receiving data ,
it's relatively simple. Just count bytes.

If you want monitor port connected with other process you can google about
WinpCap
It comes with handy documentation.

Feb 9 '06 #4
Thanks, that gives me a start. I was hoping for something from .NET but the
trace function seems more decated to getting the data then the count of
bytes.

Regards,
John

"Vadym Stetsyak" <va*****@ukr.net> wrote in message
news:ea**************@TK2MSFTNGP15.phx.gbl...
Hello, John!

JJH> Is there a way to monitor the amount of data that is sent/received
JJH> over one port on a socket? I don't care about the data just the
JJH> number of bytes.

AFAIK to know this you have to write unmanaged software called LSP (
Layered Service Provider ) that will collect traffic data for specific
port. LSP is only for sockets, if you want all data from non-socket
communications you have to use/write kernel-mode driver.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Feb 9 '06 #5
If i were you i'd try with WinPcap.
It's necesesary thing for many port sniffers ( f.e: Ethereal ), that obrain
many data from the ports.

PK
Feb 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Scott Robinson | last post by:
I have been having trouble with the garbage collector and sockets. Unfortunately, google keeps telling me that the problem is the garbage collector ignoring dead (closed?) sockets instead of...
0
by: Danny Jensen | last post by:
I need to test if certain processes on a unix box were running. I wanted to use whatsup gold to do the testing. First I needed to go to the whatsup configure>monitors & services menu to add this...
4
by: DreJoh | last post by:
I've read many articles on the subject and the majority of them give the same solution that's in article 821625 on the MSDN website. I'm using the following code and when a the client disconnects...
1
by: Rolln_Thndr | last post by:
I'm vey new to network programing and have a few rather fundemental questions. I'm creating a very basic UDP proxy server and having a few issues regarding the sockets. Is it possible to change...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
5
by: John Sheppard | last post by:
Hi all, I am not sure that I am posting this in the right group but here it goes anyway. I am new to socket programming and I have been searching on the internet to the questions I am about to pose...
2
by: Droopy | last post by:
Hi, I try to implement a reusable socket class to send and receive data. It seems to work but I have 2 problems : 1) I rely on Socket.Available to detect that the connection is closed (no...
5
by: zxo102 | last post by:
Hi, I am doing a small project using socket server and thread in python. This is first time for me to use socket and thread things. Here is my case. I have 20 socket clients. Each client send a...
5
by: darthghandi | last post by:
I've created a class to listen to all interfaces and do a BeginAccept(). Once it gets a connection, it passes the connected socket off and stores it in a List. Next, it continues to listen for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.