Module Async.Std.Tcp

module Tcp: sig .. end
Functions for connecting to remote hosts over the network.

type 'a where_to_connect 
Represents an address that can be connected to.
val to_host_and_port : string -> int -> Socket.Address.t where_to_connect
Interprets a string and int as a network host and port that can be connected to.
val connect : 'a where_to_connect ->
('a Socket.t * Reader.t * Writer.t)
Deferred.t
Create a connection to the given address. Returns a Reader.t and a Writer.t that can be used to communicate with the remote endpoint.

Raises an exception if it cannot connect to the worker


Note: you can close the connection by calling Socket.shutdown `Both on the Socket