[Mono-dev] Listening in on a port (was the daemon thingy a week or so back)

Ajay Gupta ajay at irtms.com
Tue Jan 12 09:36:40 EST 2010


Hi,

Your design have few issues. If they are acceptable limitation, can there
is simple way:

1. run netstat -an and grep to connection from your son's PC.
2. Any connection, will mark begin of your 1 hour time.
3. Start simple timer and you are mostly done.
4. As suggested, if you listen using HttpListener, assume  he gets first
connection, and then either PC is rebooted or connection dies, then you /
him will have issues with 1 hour time.


issue(s) with your design:
1. If he browse 5 min to search  something, and does not comeback for 2
hours, you will not not honor your SLA and OLA with your son.
2. If he goes to a different site which is running on 8080, then your
program will not catch that.
3. Hence you need to check all ports.

Recommendation :
1. Just enable connection from given start time for 1 hour. Mostly all new
routers can do this out of box.
2. with above, you can add eMail alert with start-time/ endtime, sites
visited, bandwidth used from his PC ( just for audit purpose ).

:)


Ajay Gupta






Ajay Gupta
eMail   : ajay at iRTMS.com




> On 12.01.2010 14:08, PFJ wrote:
>>
>> Hi,
>>
>> I'm making some progress with my daemon in C# to listen in on port 80
>> and
>> monitor how much time my son is spending on line, but I've hit a snag.
>
> A daemon listening on port 80 won't be able to monitor anything
> but connections made to it. Is this what you want? Do you want
> to write a HTTP proxy or something? Then have a look at the
> HttpListener class.
>
> Robert
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list