{"size": 4221, "ext": "scrbl", "max_stars_repo_path": "scribblings/transport.scrbl", "max_stars_repo_name": "johnstonskj/racket-thrift", "max_stars_repo_stars_event_min_datetime": "2018-12-31T01:14:13.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-25T07:09:56.000Z", "max_issues_repo_path": "scribblings/transport.scrbl", "max_issues_repo_name": "DavidAlphaFox/racket-thrift", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scribblings/transport.scrbl", "max_forks_repo_name": "DavidAlphaFox/racket-thrift", "max_forks_repo_forks_event_min_datetime": "2021-01-05T15:21:19.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-05T15:21:19.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 19.7242990654, "max_line_length": 80, "alphanum_fraction": 0.4986969912}
#lang scribble/manual

@(require racket/sandbox
          scribble/core
          scribble/eval
          (for-label racket/base
                     racket/contract
                     thrift))

@;{============================================================================}

@(define example-eval (make-base-eval
                      '(require racket/string
                                thrift)))

@;{============================================================================}

@title[]{Thrift Transport Support.}

Support for Thrift transports

@examples[ #:eval example-eval
(require thrift)
; add more here.
]

@;{============================================================================}
@section[]{Transport Common}
@defmodule[thrift/transport/common]

@defstruct*[transport
            ([name string?]
             [source string?]
             [port port?]
             [overrides hash?])]{
TBD
}

@defproc[(transport-peek
          [t transport?])
         byte?]{
TBD
}
  
@defproc[(transport-read-byte
          [t transport?])
         byte?]{
TBD
}
  
@defproc[(transport-read-bytes
          [t transport?]
          [amt exact-positive-integer?])
         bytes?]{
TBD
}
  
@defproc[(transport-read
          [t transport?])
         any/c]{
TBD
}

@defproc[(transport-write-byte
          [t transport?]
          [b byte?])
         void?]{
TBD
}
  
@defproc[(transport-write-bytes
          [t transport?]
          [bs bytes?]
          [start-pos exact-nonnegative-integer? 0]
          [end-pos exact-nonnegative-integer?])
         void?]{
TBD
}
  
@defproc[(transport-write
          [t transport?]
          [v any/c])
         void?]{
TBD
}
  
@defproc[(transport-size
          [t transport?])
         (or/c exact-nonnegative-integer? eof-object?)]{
TBD
}

@defproc*[([(transport-read-position
             [t transport?])
            (or/c exact-nonnegative-integer? eof-object?)]
           [(transport-read-position
             [t transport?]
             [pos exact-nonnegative-integer?])
            (or/c exact-nonnegative-integer? eof-object?)])]{
TBD
}

@defproc[(input-transport?
          [t transport?])
         boolean?]{
TBD
}
  
@defproc[(output-transport?
          [t transport?])
         boolean?]{
TBD
}

@defproc[(flush-transport
          [t output-transport?])
         void?]{
TBD
}

@defproc[(close-transport
          [t transport?])
         any/c]{
TBD
}

@;{============================================================================}
@section[]{Buffered and Framed Transports}
@defmodule[thrift/transport/buffered]

@defproc[(open-input-buffered-transport
          [wrapped input-transport?])
         input-transport?]{
TBD
}

@defproc[(open-output-buffered-transport
          [wrapped output-transport?])
         output-transport?]{
TBD
}

@defproc*[(
  [(buffered-read-length) positive-integer?]
  [(buffered-read-length [length positive-integer?]) void?]
)]{
TBD
}

@defproc[(open-input-framed-transport
          [wrapped input-transport?])
         input-transport?]{
TBD
}

@defproc[(open-output-framed-transport
          [wrapped output-transport?])
         output-transport?]{
TBD
}

@;{============================================================================}
@section[]{File Transport}
@defmodule[thrift/transport/file]

@defproc[(open-input-file-transport
          [file-path string?])
         transport?]{
TBD
}

@defproc[(open-output-file-transport
          [file-path string?])
         transport?]{
TBD
}

@;{============================================================================}
@section[]{Console Transport}
@defmodule[thrift/transport/console]

@defproc[(open-input-console-transport
          [buffer bytes?])
         transport?]{
TBD
}

@defproc[(open-output-console-transport)
         transport?]{
TBD
}

@;{============================================================================}
@section[]{In-Memory Transport}
@defmodule[thrift/transport/memory]

@defproc[(open-input-memory-transport
          [read-buffer bytes?])
         transport?]{
TBD
}

@defproc[(open-output-memory-transport)
         transport?]{
TBD
}

@defproc[(transport-output-bytes
          [t transport?])
         bytes?]{
TBD
}

