ebnc patch
"A. Craig West" <[email protected]> Sun, 21 Mar 2004 02:46:28 -0500 (EST)
| Newsgroups | gmane.network.everybuddy.devel |
|---|---|
| Message-ID | <[email protected]> |
I discovered something interesting when browsing the ebnc code this evening. (Don't worry, Karine, this is by no means an ebnc-only thing, it is all over the place :-) ) It appears that we do much of our socket communication, particularly when communicating with GUI's, using read() and write() calls, often with separate write calls for individual bytes. I'm not certain, but I believe that this results in separate packets being sent for each call to write, which isn't very efficient. I'm not positive that this is true, but it seems likely, as write() is supposed to be non-buffered. To correct this, I propose modifying the code to build up a buffer containing the entire packet before sending it with a single call to write(). Incidentally, it would be nice if we had a single version of the GUIcomms.c code, I've seen quite a number of them, with minor differences to each... I'm not sure what the best way to resolve this surplus, but I'm sure we can think of something :-) -- Craig West Ph: (416) 666-1645 | It's not a bug, [email protected] | It's a feature...