🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
2 messages
2 total messages Started by Jon S. Berndt Tue, 16 Jan 2007 05:44
"only one usage of each socket address is ..."
#1525
Author: Jon S. Berndt
Date: Tue, 16 Jan 2007 05:44
13 lines
1536 bytes
Using BC++Builder 3.0 I have a simple app that uses a TServerSocket. I've 
set the Port to 2000 (or whatever) at design time. But, I want to be able to 
change the Port before I really start using the socket. So, I Close() the 
socket, change the Port, then Open() the socket. I get the cryptic error:

"only one usage of each socket address is allowed"

I've found this error is not uncommon through a Google search, but I could 
not find any help with the as it works in the VCL component. Has nayone else 
worked through this problem? I suspect I'm doing something simple (but 
wrong).

Jon
Re: "only one usage of each socket address is ..."
#1429
Author: Remy Lebeau (TeamB)
Date: Tue, 16 Jan 2007 09:18
29 lines
1816 bytes
"Jon S. Berndt" <jsb@hal-pc.org> wrote in message
news:45ac6634$1@newsgroups.borland.com...

> Using BC++Builder 3.0 I have a simple app that uses a TServerSocket.
> I've set the Port to 2000 (or whatever) at design time. But, I want
to be
> able to change the Port before I really start using the socket.

Then do not set the TServerSocket's Active property to true at
design-time.  Set it to false instead, and then set it to true in code
after you have changed the Port.

> So, I Close() the socket

That is unnecessary if the server is not activated in the first place.

> change the Port, then Open() the socket.

You did not say whether you are using the server in blocking or
non-blocking mode.

> I get the cryptic error:

You set the Port to a value that is already in use somewhere else on
the machine.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads