Re: Non-blocking method for reading writing objects to sockets



Joseph Dionne wrote:

Technically there are not non blocking socket write methods in any language. There is either room enough in the socket write MCB to hold the data, allowing the method to return, or there is not enough room, and an error is returned to indicate a failure.

Technically and more accurately, there *are indeed* non-blocking socket write methods in both C and Java. In non-blocking mode, a socket write will put as much as it can of the application data into the socket send buffer without blocking and return that count, which can be zero if there was no room. This is not an error condition.


I don't know what is meant by 'MCB', it is not a term associated with sockets.

Either increase your transmit buffer size, which I believe defaults to 32kb

The default is platform dependent. It is 8k on Windows which is not sufficient.


, or find out why the data is not being transmitted to the network.

to which the answer can really only be that the client isn't reading fast enough, or at all.
.




Relevant Pages

  • Re: Problems with French electricity
    ... Did the French socket have an earth connection..lack of earth will make the ... MCB trip out? ... The fridge worked perfectly on gas and the mains sockets were ... Reversed polarity on the socket on the French site? ...
    (uk.rec.motorcaravans)
  • Re: Non-blocking method for reading writing objects to sockets
    ... There is either room enough in the socket write MCB to hold the data, allowing the method to return, or there is not enough room, and an error is returned to indicate a failure. ... Conceptually, a non blocked socket read method is expected to do one of two things, return data, or indicate that no data is returned, while a socket write can have three states, all data written, some data written, no data written. ... I'm pretty sure no one desires half of the STREAM delivered to the remote client. ...
    (comp.lang.java.programmer)
  • Re: Restaurant+asp.net+palmtop
    ... Those printers support EPL or ZPL language. ... IPEndPoint ipEndPoint; ... Socket socket; ... clicks "send itens" on IE palmtop, it needs to send the itens to a ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Restaurant+asp.net+palmtop
    ... Those printers support EPL or ZPL language. ... IPEndPoint ipEndPoint; ... Socket socket; ... clicks "send itens" on IE palmtop, it needs to send the itens to a ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Socket errors and errno.
    ... > (and attempt a recovery if possible). ... > the socket is ready to read/write. ... > re-establish the connection with the remote host. ... Perhaps detecting the EPIPE error condition and trying to reconnect ...
    (comp.unix.programmer)