Link to home
Start Free TrialLog in
Avatar of aureliuh
aureliuh

asked on

IPC through socketc in windows

Hello,

Is there any method to implement an IPC with sockets on Windows but the connection between server and client to be invisible with netstat ?

Thank you very much

ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any socket communication will be visible via netstat - and that is good the way it is. Otherwise malware could communicate without the risk of being detected. Why do you want to hide your communication?
Avatar of aureliuh
aureliuh

ASKER

Ok... I understand that iot is a good thing to see those connections, but I am not interested in a connection with the outside (Lan, internet)
I want to make a client and a server and use only the loopback interface. So this is the reasson that I thaught it could be possible

If it is only local anyway, why would you want to hide the connection?
If user will run netstat -a , he will see a bunch of terminated connections.
jkr is right. If you need a p2p communication locally only, sockets is not the only choice - maybe not even the preferred one.

I would go for shared memory if the amount of data transferred at a given time slot can be limited. E. g. you could make a little class which creates or opens a fixed size piece of shared memory (create for first access, open for second) and provides a multi-process-safe queue management for two queues, one for the server and one for the client. The synchronization can be achieved by means of a named mutex object or by a hand-made synchronization similar to traffic lights. The interface would work similar to a non-blocking socket, so that each side easily could check for incoming messages and make a safe read on the own queue and a safe write to the other side's queue.

Regards, Alex