| | |
- calcsize(format, /)
- Return size in bytes of the struct described by the format string.
- cti_connect(io, encoding)
- セッションを開始します。
io: ソケット
encoding: 通信に用いるエンコーディング
- iter_unpack(format, buffer, /)
- Return an iterator yielding tuples unpacked from the given bytes.
The bytes are unpacked according to the format string, like
a repeated invocation of unpack_from().
Requires that the bytes length be a multiple of the format struct size.
- pack(...)
- pack(format, v1, v2, ...) -> bytes
Return a bytes object containing the values v1, v2, ... packed according
to the format string. See help(struct) for more on format strings.
- pack_into(...)
- pack_into(format, buffer, offset, v1, v2, ...)
Pack the values v1, v2, ... according to the format string and write
the packed bytes into the writable buffer buf starting at offset. Note
that the offset is a required argument. See help(struct) for more
on format strings.
- read_byte(io)
- 8ビット数値を読み込みます。
io: ソケット
戻り値: 数値
- read_bytes(io)
- 16ビットビッグインディアン数値を読み込み、そのバイト数だけバイト列を読み込みます。
io: ソケット
戻り値: バイト列
- read_int(io)
- 32ビットビッグインディアン数値を読み込みます。
io: ソケット
戻り値: 数値
- read_long(io)
- 64ビットビッグインディアン数値を読み込みます。
io: ソケット
戻り値: 数値
- read_short(io)
- 16ビットビッグインディアン数値を読み込みます。
io: ソケット
戻り値: 数値
- readfully(io, a)
- データをバイト数だけ確実に読み込みます。
io: ソケット
a: バイト数
戻り値: 読み込んだ文字列
- req_abort(io, mode)
- 変換処理の中断を要求します。
io: ソケット
mode: 0=生成済みのデータを出力して中断, 1=即時中断
- req_client_resource(io, mode)
- サーバーからクライアントのリソースを要求するモードを切り替えます。
io: ソケット
mode: 0=off, 1=on
- req_close(io)
- 通信を終了します。
io: ソケット
- req_continuous(io, mode)
- 複数の結果を結合するモードを切り替えます。
io: ソケット
mode: 0=off, 1=on
- req_eof(io)
- 終了を通知します。
io: ソケット
- req_join(io)
- 変換結果を結合します。
io: ソケット
- req_missing_resource(io, uri)
- リソースの不存在を通知します。
io: ソケット
uri: URI
- req_property(io, name, value)
- プロパティを送ります。
io: ソケット
name: 名前
value: 値
- req_reset(io)
- 状態のリセットを要求します。
io: ソケット
- req_resource(io, uri, mime_type='text/css', encoding='', length=-1)
- リソースの開始を通知します。
io: ソケット
uri: URI
mime_type: MIME型
encoding: エンコーディング
length: 長さ
- req_server_info(io, uri)
- サーバー情報を要求します。
io: ソケット
uri: URI
- req_server_main(io, uri)
- サーバー側データの変換を要求します。
io: ソケット
uri: URI
- req_start_main(io, uri, mime_type='text/html', encoding='', length=-1)
- 本体の開始を通知します。
io: ソケット
uri: URI
mime_type: MIME型
encoding: エンコーディング
length: 長さ
- req_write(io, b)
- データを送ります。
io: ソケット
b: データ
- res_next(io)
- 次のレスポンスを取得します。
結果ハッシュには次のデータが含まれます。
- 'type' レスポンスタイプ
- 'anchorId' 挿入する場所の直後のフラグメントID
- 'level' エラーレベル
- 'error' エラーメッセージ
- 'id' 断片ID
- 'progress' 処理済バイト数
- 'bytes' データのバイト列
io: ソケット
戻り値: レスポンス
- unpack(format, buffer, /)
- Return a tuple containing values unpacked according to the format string.
The buffer's size in bytes must be calcsize(format).
See help(struct) for more on format strings.
- unpack_from(format, /, buffer, offset=0)
- Return a tuple containing values unpacked according to the format string.
The buffer's size, minus offset, must be at least calcsize(format).
See help(struct) for more on format strings.
- write_byte(io, b)
- 8ビット数値を書き出します。
io: ソケット
b: 数値
- write_bytes(io, b)
- バイト数を16ビットビッグインディアンで書き出した後、バイト列を書き出します。
io: ソケット
b: バイト列
- write_int(io, a)
- 32ビット数値をビッグインディアンで書き出します。
io: ソケット
a: 数値
- write_long(io, a)
- 64ビット数値をビッグインディアンで書き出します。
io: ソケット
a: 数値
|