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



Joseph Dionne wrote:

As you may or may not know, not knowing the level of expertise you bring to this discussion, socket stream of non ASCII STREAMS, use two to four bytes preceding the data allowing the received to know the message size and prepare applications to receive the data.

I've only been doing sockets since BSD 4.1, about 1983-4, but if this is supposed to be a statement that is true of all non ASCII streams it just isn't. Some application protocols do it. Some application protocols e.g. XDR do something else. TCP doesn't do *anything* except put the required length field in the IP header. Quite a few application protocols don't prefix message lengths either: Telnet, FTP, and HTTP for starters.


> My original point what that there exist no single socket interface
method that removes the responsibility to manage the socket STREAMS like garbage collection has done for memory management.

Well, I though your original point was '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.' There's now so much irrelevance being added such as lectures on threads and further incorrect claims that the orignal incorrect statement is being obscured, but it's still incorrect.
.




Relevant Pages

  • Re: Non-blocking method for reading writing objects to sockets
    ... bring to this discussion, socket stream of non ASCII STREAMS, use two to four bytes preceding the data allowing the received to know the message size and prepare applications to receive the data. ... I've only been doing sockets since BSD 4.1, about 1983-4, but if this is supposed to be a statement that is true of all non ASCII streams it just isn't. ... Some application protocols e.g. XDR do something else. ... There's now so much irrelevance being added such as lectures on threads and further incorrect claims that the orignal incorrect statement is being obscured, ...
    (comp.lang.java.programmer)
  • Re: REMINDER: Re: HEADS UP: network stack and socket hackery over the next few weeks (fwd)
    ... committed an extensive set of socket and netinet changes which will likely render the network stack broken. ... Protocols can now explicitly request that a socket not be freed on last ... consumer reference, using the SS_PROTOREF flag, in order that they can ...
    (freebsd-net)
  • Re: Protocols to exchange messages via a socket
    ... protocols are best suitable: ... socket in case of a decoding error? ... You cannot be sure how many messages were lost on the wire behind any ... assuming TCP the atomicity of writes isn't guaranteed. ...
    (comp.unix.programmer)
  • Re: Example network protocol implementation
    ... I think netgraph subsystem provides this infrastructure for implementing new protocols. ... This would be good if you are implementing an iSCSI ... you call socreate to get a socket. ...
    (freebsd-hackers)
  • Re: LSP bypass method - pls help
    ... > What I do now, if I detect there are calls in that socket after WSPSocket, I ... same lower provider is called, indepently of which protocol is the socket for. ... MS Recomends installing the LSP over all protocols of the same family, ...
    (microsoft.public.win32.programmer.networks)