🔒 Locked
Async Sockets or Multithreaded Blocking?
Advertisement
Original Post
Anyone ever explore the performance advantages or disadvantages of each? I''m looking at this scenario: game server with 100+ open connections (TCP streams).
With a newer gcc (2.95.3) and win2k will I run into any limit of the number of simultaneous sockets? I''ve heard stories of functions like select() capping at 64 sockets =/
Ranger
Asynchronous is the way to go. If you''re writing a server-type application for Windows NT/2000/XP, I highly recommend using I/O completion ports. There''s simply no faster method on that platform.
codeka.com - Just click it.
codeka.com - Just click it.
Definetly not blocking - sequence & batch will give you the best performance.
quote:
Original post by Dean Harding
Asynchronous is the way to go. If you''re writing a server-type application for Windows NT/2000/XP, I highly recommend using I/O completion ports. There''s simply no faster method on that platform.
codeka.com - Just click it.
I have to agree 100%
IOCP is awesome on NT.
How would one go about something like that on a 98/ME platform tho?
quote:
Original post by daerid
How would one go about something like that on a 98/ME platform tho?
Heh, with great difficulty
select or something similar (which is hella slow compared to I/O CPs) If I had my way, I''d have all of you shot!
codeka.com - Just click it.
My TCP/IP Winsock tutorial in the DevZone has successfully made over 1000 connections. Both client and server are fully buffered so you don't have to worry about partial packets or multiple messages per packet.
The download includes a client and server (asyncronous) with a modified Winsock.H that supports up to 16,000 connections.
#define FD_SETSIZE 16000
In winsock.h that's by default 64. That's where the "limit" comes from.
You'd need IO completion ports to pull that many off though.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting | Dot Com ]
[edited by - KalvinB on July 29, 2002 5:39:40 AM]
The download includes a client and server (asyncronous) with a modified Winsock.H that supports up to 16,000 connections.
#define FD_SETSIZE 16000
In winsock.h that's by default 64. That's where the "limit" comes from.
You'd need IO completion ports to pull that many off though.
Ben
IcarusIndie.com [ The Rabbit Hole | The Labyrinth | DevZone | Gang Wars | The Wall | Hosting | Dot Com ]
[edited by - KalvinB on July 29, 2002 5:39:40 AM]
Yeah, it''s possible, but I bet if you compared the difference between using a 1,000 socket
codeka.com - Just click it.
select and 1,000 sockets using I/O completion ports there''d be a big difference in performance If I had my way, I''d have all of you shot!
codeka.com - Just click it.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement