class JsonRpc::TcpClient

Overview

Implements JSON-RPC over TCP.

Defined in:

json_rpc/tcp_client.cr

Constructors

Instance Method Summary

Instance methods inherited from class JsonRpc::StreamClient

close close, inspect(io) inspect, read_loop read_loop, read_once read_once, remote_address : String remote_address, request_size_limit : Int32 request_size_limit, request_size_limit=(request_size_limit : Int32) request_size_limit=, run run, send_message(_id, message_data) send_message, stream : DocumentStream stream

Constructor methods inherited from class JsonRpc::StreamClient

new(stream : JsonRpc::DocumentStream, remote_address : String, run = true) new

Instance methods inherited from module JsonRpc::Stream

process_document(document : String) process_document, recv_message(id) recv_message

Instance methods inherited from class JsonRpc::Client

async_call : Bool async_call, async_call=(async_call : Bool) async_call=, call(result_type, method : String, params = nil) call, call?(result_type, method : String, params = nil) call?, close close, connection_lost : Signal_connection_lost connection_lost, fatal_local_error : Signal_fatal_local_error fatal_local_error, fatal_remote_error : Signal_fatal_remote_error fatal_remote_error, flood_messages : Int32 | Nil flood_messages, flood_messages=(flood_messages : Int32 | Nil) flood_messages=, flood_protection_triggered : Signal_flood_protection_triggered flood_protection_triggered, flood_time_span : Time::Span flood_time_span, flood_time_span=(flood_time_span : Time::Span) flood_time_span=, handler : Handler handler, handler=(handler : Handler) handler=, invoke_from_remote(request : Request, raw : String) : Nil invoke_from_remote, messages_received : UInt64 messages_received, messages_sent : UInt64 messages_sent, notification : Signal_notification notification, notify(method : String, params = nil) notify, notify_raw(message : String) notify_raw, recv_message(id) recv_message, remote_address : String remote_address, running? : Bool running?, send_message(id, message_data : String) send_message, send_response(response : Response) send_response

Constructor methods inherited from class JsonRpc::Client

new new

Constructor Detail

def self.new(socket : TCPSocket, run = true) #

Creates a TCP client from socket. If run is true, the client will start accepting messages right away. If you choose to pass false, then make sure to call #run some time afterwards manually, even if you're only calling remote methods.


[View source]

Instance Method Detail

def inspect(io) #

[View source]
def socket : TCPSocket #

[View source]