Howto do multiple servers ??

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Gary Law.

Does anyone know how to have multiple servers in an application ?
The NetworkServerEvent() and NetworkClient() does not allow me to determine which server received the event - only which client sent it.
Any thoughts ??

Thanks

Gary
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by freak.

We've allready had this problem in the german Forum:

The Docs say:
> Any number of servers can run simultaneously on the same computer but not with the same port
> number.

That is true, but it seems, that there can be only one Server per Program (at least per Pb Program).

None of the NetworkServer-Commands is able to handle multiple servers ATM, sorry.

I think the Docs need to be changed here a bit. (or PB must be improved )

Timo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Gary Law.

Thanks

I was going to try my hand at threaded app - but maybe not now

Gary

Makes writing an ftp client that work with PASV mode kinda tricky :wink:
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.

You can maybe make a dll that acts as second server..
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by JohnDeHope3.

Just a thought. If you started a new thread (see threads in PB help) perhaps that new thread would have it's own server? I jave no idea if this is true or not.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Pupil.
Originally posted by JohnDeHope3

Just a thought. If you started a new thread (see threads in PB help) perhaps that new thread would have it's own server? I jave no idea if this is true or not.
No, to my knowledge a network server started in PB with the 'CreateNetworkServer()' command is global to the rest of the program, so starting a thread that tries to create a new server would not be a solution.
Post Reply