|
-
February 3rd, 2010, 08:08 AM
#1
tcpip/winsock -- how long to keep connection open?
Hi, guys. I'm a n00b with tcpip/winsock, and I'm curious about performance in a simple real-time game server/client.
What I'm doing:
-server takes control data from client (maybe 4-6 bytes) and process character positions, collisions etc.
-server sends a small packet of data (maybe 20-40 bytes) very often (ideally 60 times/sec for "real time" control but about 10 times/sec would be okay)
-client does nothing but update screen characters using coordinates provided by the server, and take in input to send back to the server.
My question:
-Should I keep a persistent connection open for each client, and send byte-length codes each time I send data? or
-Can I close/reopen the connections 10-60 times / sec?
-Also, can anyone offer other advice, pointers or links with regard to a very simple protocol that they've used?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|