Thanks Charles, thanks Joe.
Below is the code from the AddSocket() event of the serversocket.
Joe, if I understand you correctly there is no point in me setting
the port of the added socket, even though they should be listening on
that port?
-----------
AddSocket()
dim ns as GameboardSocket
ns=new GameboardSocket(MyGame)
ns.Server=true 'telling the socket that it is operating on the
_serverside_
if ThePrefs.CurrentlyUsedConfig isa ServerConfigurationSet then
ns.Port=ThePrefs.CurrentlyUsedServerConfig.PortUsed
else
ns.Port=ThePrefs.DefaultServerConfig.PortUsed
end if
ns.Listen
Return ns
----------
Notes on the code:
Gameboardsocket is a subclass of EasyTCP sockets;
MyGame is a custom class; so is all the Config stuff.
The only thing I see here is that I set the ports - could that be a
cause, besides not explicitly setting maximumConnections to 10? (even
though it is set to 10 according to a str
(Serversocket.Maximumconnections) messagebox in the open event of the
window where it's used which I just tested.)
BTW I also had the server write a system.debuglog line for every
created socket, and he does create 10 on startup, as expected.
If you're telling me this should all work I'll run another test with
my overseas users and we give their firewalls a closer look again. It
might not be RB after all.
Yes. In reality, each of the incoming connections gets handed off
to a
different port; you can see this by inspecting the Port property of
your
EasyTCP's. But the listening always happens on the server port,
and you
can receive any number of connections (up to the maximum you
specify) on
that same port.
Cheers,
- Joe
From: Charles Yeomans <charles@declareSub.com>
...
Would you post your code from AddSocket()?
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|