MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Sockets
"Jon A. Lambert" wrote:
> The common select/poll loop for non-blocking sockets that processes
> incoming, exceptions, reads, writes, and other mud processes is not
> very efficient. Firstly setting up the parameters to select and checking
> the FD_SETs involved alone is probably higher overhead than threading.
Interesting theory. My MUD server sets every socket in the input set
automatically, and instead of setting them manually every time, it keeps a
pre-setup version, which it just memcpy()s from.
Output set is altered as data is ready to be sent, and has been sent.
Now, assuming that select() works in a nice sensible way, using
interrupts, basically. The OS should receive data for a socket, find the
right program, check if the program is waiting for the data (one
FD_ISSET() call there), and act accordingly.
Threaded may save you the time involved in checking if a certain bit is
set or not, but I really somehow doubt that the overhead in threading
won't be longer than that.
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev
- Thread context:
- RE: [MUD-Dev] Sockets, (continued)
- RE: [MUD-Dev] Sockets,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 08 May 1999, 05:04 GMT
- RE: [MUD-Dev] Sockets,
Petri Virkkula pvirkkul#iki,fi, Sat 08 May 1999, 18:37 GMT
- RE: [MUD-Dev] Sockets,
Jon A. Lambert jlsysinc#ix,netcom.com, Tue 11 May 1999, 20:12 GMT
- Re: [MUD-Dev] Sockets,
Ola Fosheim Grøstad olag#ifi,uio.no, Wed 12 May 1999, 22:15 GMT
- RE: [MUD-Dev] Sockets,
Caliban Tiresias Darklock caliban#darklock,com, Wed 12 May 1999, 22:17 GMT
- Re: [MUD-Dev] Sockets,
Mark Gritter mark#erdos,Stanford.EDU, Wed 12 May 1999, 22:26 GMT
- RE: [MUD-Dev] Sockets,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sun 09 May 1999, 11:23 GMT
[ Other Periods
| Other mailing lists
| Search
]