View Source KafkaEx.Network.Socket (kafka_ex v1.0.0-rc.1)
This module handle all socket related operations.
Summary
Functions
Closes the socket.
Creates a socket.
For more information about the available options, see :ssl.connect/3 for ssl or :gen_tcp.connect/3 for non ssl.
Returns the information about the socket.
Returns true if the socket is open
Receives data from the socket.
Sends data over the socket. It handles both, SSL and non SSL sockets.
Set options to the socket.
Types
@type t() :: %KafkaEx.Network.Socket{ socket: :gen_tcp.socket() | :ssl.sslsocket(), ssl: boolean() }
Functions
Closes the socket.
For more information, see :ssl.close/1 for ssl or :gen_tcp.send/1 for non ssl.
Handles both Socket structs and raw ports (for tcp_closed/ssl_closed handlers).
Creates a socket.
For more information about the available options, see :ssl.connect/3 for ssl or :gen_tcp.connect/3 for non ssl.
Returns the information about the socket.
For more information, see Port.info
Returns true if the socket is open
Receives data from the socket.
For more information, see :ssl.recv/2 for ssl or :gen_tcp.recv/2 for non ssl.
Sends data over the socket. It handles both, SSL and non SSL sockets.
For more information, see :ssl.send/2 for ssl or :gen_tcp.send/2 for non ssl.
Set options to the socket.
For more information, see :ssl.setopts/2 for ssl or :inet.setopts/2 for non ssl.