[usocket-ticket] Re: #7: Provide :external-format for stream and stream-server type sockets

usocket usocket-devel at common-lisp.net
Wed Jan 3 22:41:31 UTC 2007


#7: Provide :external-format for stream and stream-server type sockets
--------------------------+-------------------------------------------------
  Reporter:  ehuelsmann   |       Owner:  default    
      Type:  enhancement  |      Status:  new        
  Priority:  minor        |   Milestone:  release-0.3
 Component:  tcp-socket   |     Version:             
Resolution:               |    Keywords:             
     Patch:  0            |  
--------------------------+-------------------------------------------------
Old description:

> From one of my posts on the mailing list:
>
> "On IRC, I had some discussions whether it would be enough to just
> support octet streams, but it looks like not all implementations
> support octet streams. Definitely not all of them support
> :external-format for sockets.
>
> So, as I mentioned in earlier posts, it might be a good idea to start
> depending on flexi-streams: this gives us portable external-formats as
> well as bivalent streams. The latter is important for many TCP/IP
> protocols: HTTP has a character header, but binary content. Other
> protocols have that too (8BIT smtp).
>
> So, to stay backward compatible, this is what I'd like to do:
>
>   - If no external-format is given: just return the raw stream returned
> by the implementation (as we do now)
>
>   - If an external-format is specified, create a raw stream with 'octet'
> element-type and wrap the returned stream with a flexi-stream,
> exposing the flexi-stream to the caller."

New description:

 From one of my posts on the mailing list:

 "On IRC, I had s
 ome discussions whether it would be enough to just
 support octet streams, but it looks like not all implementations
 support octet streams. Definitely not all of them support
 :external-format for sockets.

 So, as I mentioned in earlier posts, it might be a good idea to start
 depending on flexi-streams: this gives us portable external-formats as
 well as bivalent streams. The latter is important for many TCP/IP
 protocols: HTTP has a character header, but binary content. Other
 protocols have that too (8BIT smtp).

 So, to stay backward compatible, this is what I'd like to do:

   - If no external-format is given: just return the raw stream returned
 by the implementation (as we do now)

   - If an external-format is specified, create a raw stream with 'octet'
 element-type and wrap the returned stream with a flexi-stream,
 exposing the flexi-stream to the caller."

Comment (by ehuelsmann):

 Some implementations (Franz, SBCL, Scieneer (?)) have bivalent streams
 natively, others don't support bivalent streams within their stream
 implementation. No implementations share the same spec for :external-
 format.

 In order for this issue to be resolved portably, there'd need to be a
 generic external-format specification which vendors adhere to.

-- 
Ticket URL: <http://trac.common-lisp.net/usocket/ticket/7>
usocket <http://common-lisp.net/project/usocket>
usocket


More information about the usocket-ticket mailing list