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
Howto do multiple servers ??
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
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

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

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

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

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
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.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.