twineMAN
asked on
hook a port
how can I detect when a port (winsock) is used and depending of situation close the port.
Put a ServerSocket on your form and try this code:
ServerSocket1.Port := yourport;
try
ServerSocket1.Active := true;
except
ShowMessage('Port is in use');
end;
Epsylon.
ServerSocket1.Port := yourport;
try
ServerSocket1.Active := true;
except
ShowMessage('Port is in use');
end;
Epsylon.
that's it, i think...
Well, since twineMAN is not responding.....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is impossible to close a port that is being used by another program.
Epsylon.