Hi,
I am asking alot of question lately
Windows 7, Builder 2010, standard install
I have the following code:
- Code: Select all
try
{
mTCPServer = new TIdTCPServer( NULL );
mTCPServer->OnExecute = MyExecute;
mTCPServer->DefaultPort = 32790;
mTCPServer->Active = true;
}
catch( ... )
{
}
in my constructor.
When I run this code I get two exceptions when I turn the server active:
- Code: Select all
First chance exception at $75FE9617. Exception class EIdSocketError with message
'Socket Error # 10048
Address already in use.'.
Process PhaseManager.exe (3104)
and then
- Code: Select all
First chance exception at $75FE9617. Exception class EIdCouldNotBindSocket with message 'Could not bind socket. Address and port are already in use.'. Process PhaseManager.exe (3104)
But the code works perfectly. I can telnet into 32790 and get a response (my OnExecute simply echos what I type with a timestamp).
I really should not be getting these exceptions because the open and bind appear to be working perfectly. Any ideas?
I do not get these exceptions if I drop a TcpServer on my unit, only if I 'new' it.
Thanks,
Gregor
