Re(2): A NSOutputStream vs. native socket question
Re(2): A NSOutputStream vs. native socket question
- Subject: Re(2): A NSOutputStream vs. native socket question
- From: Peter Lovell <email@hidden>
- Date: Thu, 14 Nov 2013 18:59:44 -0400
I am reminded of the saying ...
Old hardware goes into museums.
Old software goes into production.
I don't envy your task. Good luck !
Cheers.....Peter
Motti Shneor <email@hidden> wrote:
>Hi Josh. I will answer your question, but could I please ask you to also
>provide some answer to mine?
>
>In the organization I'm working for (as a contractor), we're using an
>old, (and dare I say wracked) "socket" implementation which maintains
>its own message queue on a cyclic buffer, from which it draws data and
>writes it to the NSOutputStream's socket.
>
>This socket's design and most of its implementation are taken from an
>even-older C++ Windows (sigh) implementation over a windows native
>socket who is opaque and provides no information neither about the size
>of its buffers, nor of their current contents size.
>
>Under those historical windows-imposed considerations, the only way to
>have reasonable bandwidth measurements (how much was pushed through the
>network in the last second, and what is the "delay" of data in "our
>side" of the server connection) is by reducing the size of the socket's
>internal (opaque) buffers, in comparison with the external socket queue,
>and do the measurements on OUR queue.
>
>When the system socket's internal buffers are small and there is a
>network bandwidth problem --- we know it early, by failing to write new
>data into the system socket.
>
>OF COURSE THIS IS A BAD IMPLEMENTATION.
>
>However, I'm a contractor, hired to debug old code, and I can only
>recommend on enhancing (actually deleting) this old socket code. This is
>nontrivial because this socket code is doing much more than what I said,
>and is tightly bound to the specific protocol running between the server
>and client. It also implements non-standard encryption, nonstandard
>proxy interactions, and most important -- same socket code runs on
>server (Windows) and all sorts of clients. In time, I may be called to
>replace it with better implementation.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden