Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Client / Server Connection?

Author
Message
Ablaze
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 11th Oct 2002 18:55
Is it possible to create a Server app and a client app with DBpro... not a p2p...

If there is it would be cool if anyone could him me with a small code example...

Server Listen
Client 1 sends a Value
Server take that Value and do something with it
Server sends the new Value to Client 2
Client 2 shows the value
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 11th Oct 2002 21:16
Would be possible, but do you really feel like making your own protocol?

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 11th Oct 2002 21:31
Yes, it's possible, no you don't need to write your own protocol.

Don't have any code but look at the Multiplayer commands/features to figure out how to write it.

As long as both clients are connected to the server app, your idea will work.

Zep--

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 11th Oct 2002 21:51
Define what a protocol is. Unless the two are VERY specific about what they can and can't send at various times, or you get very picky with definitions, you will essentially be creating your own protocol. It may be fairly limited, and operate over another protocol, but I think it will fit under the definition. I never said it had to be recognised by Windows as one, or installed in the Network properties of each machine.

The main thing, though, is you will have to make routines to handle every conceivable input and output, complete with error codes and messages, or you will be making a very fragile system indeed.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Zep
21
Years of Service
User Offline
Joined: 31st Aug 2002
Location: From PA, USA. Currently reside in Hanoi, Vietnam
Posted: 12th Oct 2002 00:26
client: send net message to server
server: listen for net message from client 1
server: send message to client 2
client 2: display message

the various built in multiplayer commands can do this with no problem. (assuming they are not buggy). What you are calling protocol, I call Data, and how to manipulate that data thru code.

Zep--

CoCoTower
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 12th Oct 2002 09:09
Right now I have 3 apps connected to 127.0.0.2, app1 is the host, the others are joiners to the P2P session. The hosts's player list is not in the same order as the joiner's lists are after doing a constant player checklist.

Roger's app (host) shows:
player1=Roger, player2=Mark, player3=Bill

Mark's app shows:
player1=Mark, player2=Bill, player3=Roger

Bills' app shows:
player1=Mark, player2=Bill, player3=Roger

now how do you suppose this comes to be, and how can a stable game be played between the group without having to attach a sub-code to each message revealing who the message is really from?

From ANY of the 3 apps, if I try to send a message to player 1, nothing gets received on any other app. If I choose to send to ALL, the other 2 apps get the message every time. So, from each app, I can only send to player 2 or 3, never 1. So am I to assume that PLAYER#1 is yourself, or the connected app., even though the refreshed player list is lying to me and telling me different?

Nobody EVER explains this stuff more than the simple stuff they already have figured out, so I have been drafting diagrams on paper after all of my tests and I will know for sure what is happening in the DB routines for each type of connection and X number of players sending to the whole group or to single players.

When I learn these "secrets" I will post them loud and clear for all to see, for I too, including right now, am missing out on the multiplayer features of a program I paid for.

CoCoTower
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location:
Posted: 12th Oct 2002 09:15
As for the 1st question of this thread, he's just wanting to know the basic procedure for sending/receiving via a client/server connection.

Nobody had to get into technical protocol stuff and scare him off. He can send anything he wants through 2 client apps connected to a server app, using MEMBLOCKS if he chooses...?

In this type of connection, I am assuming that the only way one client can get to another client is through the server. The server app would have to be coded to listen for messages, paying attention to who they're FROM and who they are TO. This is probably the least it should do. Then a simple relay of the exact message it got would work.

Getting more into it, you could even have great control over who sends what and who can receive it, etc.

Ofcourse, you might want to have the clients attach an ID code somewhere inside of their message as a double-check on the identity of the client. I'm still looking into why the player list is not the same on each CLONED app I have running.

Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 12th Oct 2002 12:24
Sorry.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM

Login to post a reply

Server time is: 2024-04-24 10:42:36
Your offset time is: 2024-04-24 10:42:36