![]() |
|
#1
|
|||
|
|||
Probing for TCP connectionsI am writing an application that will look for a specific TCP connection in windows XP. I am very new to C as I am a PHP programmer. Is there a library that I can use or is there some native function to look at the TCP connections on the machine?
Is there a way to just look at netstat data? This application will make sure some encoding software is connected to a media server at all times. So I just need it to check if the connection is present. I will be compiling it to use on Windows XP and I will be using C, not C++ Thanks! |
|
#2
|
|||
|
|||
Re: Probing for TCP connectionsQuote:
Yes! Use the IpHelper API and link to iphlpapi.lib Check out: msdn2.microsoft.com ...to see if that does about what you're trying to accomplish. :davis: |
|
#3
|
|||
|
|||
Re: Probing for TCP connectionsAlso,
If you want, you can write a simple C program that invokes netstat and dumps that info to a text file and then parse the text file... CPP / C++ / C Code:
Output: Code:
..then, you can set up a cron job (`at' under Windoze) to run your app and do whatever it is that you want based on the result of your parsing. :davis: |
|
#4
|
|||
|
|||
Re: Probing for TCP connectionsThe text dump is exactly what i was trying to do! Thanks!
This is making me enjoy C. I want to learn the language now. |
Recent GIDBlog
Toyota - 2008 November Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hardware probing using c program | helpmeforlinux | C Programming Language | 0 | 29-Sep-2006 01:29 |
| mysql_pconnect: Too many connections error | agligich | MySQL / PHP Forum | 6 | 09-Aug-2005 10:16 |
| Determining the connections in apache | mkbijoy | Apache Web Server Forum | 2 | 23-Nov-2004 22:11 |
| Http connections | mail_as | C Programming Language | 1 | 03-Jul-2004 13:16 |
| MySQL persistant connections or not? | JdS | Web Hosting Forum | 0 | 02-Jun-2002 06:49 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The