Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Network monitoring app

  • 22-04-2013 8:08am
    #1
    Registered Users, Registered Users 2 Posts: 4,113 ✭✭✭


    I searched the forum for this already but all the threads that came back were from years ago. Basically I have a client/server app. The traffic is two way;
    1. The client contacts the server via a web service (passing in a PC name)
    2. Server receives the request, queries a SQL database and returns an object.
    3. Th client parses this to an xml file and saves it on the PC. This done at logon, logoff or via button click.
    The client contacts the server through port 80 (TCP connection) so I presume I would have to measure things like the size of TCP headers etc.


Comments

  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    There are a couple of easy ways that spring to mind:
    1. The XML from the web service will be in a string somewhere in your program. Call strlen/.length/whatever as appropriate. If you're working with multi-byte character sets be careful since the length may be given to you in characters and not bytes.
    2. The HTTP server presenting the web service might include a Content-Length header which will be the size of the transfer in bytes. Depending on how much your web service call is buried in a 3rd party library this may be tricky to get at.
    3. If you can't alter the app, then you need enough control over the machine to use something like tcpdump to sniff the traffic and then extract the length from that. It's a little tedious, but it's no big deal.


  • Registered Users, Registered Users 2 Posts: 4,113 ✭✭✭lukin


    IRLConor wrote: »
    There are a couple of easy ways that spring to mind:
    1. The XML from the web service will be in a string somewhere in your program. Call strlen/.length/whatever as appropriate. If you're working with multi-byte character sets be careful since the length may be given to you in characters and not bytes.
    2. The HTTP server presenting the web service might include a Content-Length header which will be the size of the transfer in bytes. Depending on how much your web service call is buried in a 3rd party library this may be tricky to get at.
    3. If you can't alter the app, then you need enough control over the machine to use something like tcpdump to sniff the traffic and then extract the length from that. It's a little tedious, but it's no big deal.

    I actually edited my initial post Conor; the request from client to server is just a string (PC name). What is sent back is an object (C#). It's actually parsed to an XML file on the client. Sorry:o


  • Registered Users, Registered Users 2 Posts: 4,113 ✭✭✭lukin


    Found this app called wireshark that might be what I need.


  • Subscribers Posts: 4,076 ✭✭✭IRLConor


    lukin wrote: »
    Found this app called wireshark that might be what I need.

    Yep, if you're doing a one-off measurement then it should be fairly easy to do with Wireshark.


Advertisement