Liking cljdoc? Tell your friends :D

chromex.app.socket

clj

Use the chrome.socket API to send and receive data over the network using TCP and UDP connections. Note: Starting with Chrome 33, this API is deprecated in favor of the 'sockets.udp', 'sockets.tcp' and 'sockets.tcpServer' APIs.

Use the chrome.socket API to send and receive data over the
network using TCP and UDP connections. Note: Starting with Chrome 33,
this API is deprecated in favor of the 'sockets.udp', 'sockets.tcp' and
'sockets.tcpServer' APIs.

  * available since Chrome 36
  * https://developer.chrome.com/apps/socket
raw docstring

acceptclj/smacro

(accept socket-id)

This method applies to TCP sockets only. Registers a callback function to be called when a connection is accepted on this listening server socket. Listen must be called first. If there is already an active accept callback, this callback will be invoked immediately with an error as the resultCode.

|socket-id| - The socketId.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [accept-info] where:

|accept-info| - https://developer.chrome.com/apps/socket#property-callback-acceptInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-accept.

This method applies to TCP sockets only. Registers a callback function to be called when a connection is accepted on this
listening server socket. Listen must be called first. If there is already an active accept callback, this callback will be
invoked immediately with an error as the resultCode.

  |socket-id| - The socketId.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [accept-info] where:

  |accept-info| - https://developer.chrome.com/apps/socket#property-callback-acceptInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-accept.
sourceraw docstring

accept*cljs

(accept* config socket-id)
source

api-tableclj

source

bindclj/smacro

(bind socket-id address port)

Binds the local address for socket. Currently, it does not support TCP socket.

|socket-id| - The socketId. |address| - The address of the local machine. |port| - The port of the local machine.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-bind.

Binds the local address for socket. Currently, it does not support TCP socket.

  |socket-id| - The socketId.
  |address| - The address of the local machine.
  |port| - The port of the local machine.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-bind.
sourceraw docstring

bind*cljs

(bind* config socket-id address port)
source

connectclj/smacro

(connect socket-id hostname port)

Connects the socket to the remote machine (for a tcp socket). For a udp socket, this sets the default address which packets are sent to and read from for read() and write() calls.

|socket-id| - The socketId. |hostname| - The hostname or IP address of the remote machine. |port| - The port of the remote machine.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-connect.

Connects the socket to the remote machine (for a tcp socket). For a udp socket, this sets the default address which packets
are sent to and read from for read() and write() calls.

  |socket-id| - The socketId.
  |hostname| - The hostname or IP address of the remote machine.
  |port| - The port of the remote machine.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-connect.
sourceraw docstring

connect*cljs

(connect* config socket-id hostname port)
source

createclj/smacro

(create type)
(create type options)

Creates a socket of the specified type that will connect to the specified remote machine.

|type| - The type of socket to create. Must be tcp or udp. |options| - The socket options.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [create-info] where:

|create-info| - https://developer.chrome.com/apps/socket#property-callback-createInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-create.

Creates a socket of the specified type that will connect to the specified remote machine.

  |type| - The type of socket to create. Must be tcp or udp.
  |options| - The socket options.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [create-info] where:

  |create-info| - https://developer.chrome.com/apps/socket#property-callback-createInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-create.
sourceraw docstring

create*cljs

(create* config type options)
source

destroyclj/smacro

(destroy socket-id)

Destroys the socket. Each socket created should be destroyed after use.

|socket-id| - The socketId.

https://developer.chrome.com/apps/socket#method-destroy.

Destroys the socket. Each socket created should be destroyed after use.

  |socket-id| - The socketId.

https://developer.chrome.com/apps/socket#method-destroy.
sourceraw docstring

destroy*cljs

(destroy* config socket-id)
source

disconnectclj/smacro

(disconnect socket-id)

Disconnects the socket. For UDP sockets, disconnect is a non-operation but is safe to call.

|socket-id| - The socketId.

https://developer.chrome.com/apps/socket#method-disconnect.

Disconnects the socket. For UDP sockets, disconnect is a non-operation but is safe to call.

  |socket-id| - The socketId.

https://developer.chrome.com/apps/socket#method-disconnect.
sourceraw docstring

disconnect*cljs

(disconnect* config socket-id)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-infoclj/smacro

(get-info socket-id)

Retrieves the state of the given socket.

|socket-id| - The socketId.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getInfo.

Retrieves the state of the given socket.

  |socket-id| - The socketId.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getInfo.
sourceraw docstring

get-info*cljs

(get-info* config socket-id)
source

get-joined-groupsclj/smacro

(get-joined-groups socket-id)

Get the multicast group addresses the socket is currently joined to.

|socket-id| - The socketId.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [groups] where:

|groups| - https://developer.chrome.com/apps/socket#property-callback-groups.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getJoinedGroups.

Get the multicast group addresses the socket is currently joined to.

  |socket-id| - The socketId.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [groups] where:

  |groups| - https://developer.chrome.com/apps/socket#property-callback-groups.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getJoinedGroups.
sourceraw docstring

get-joined-groups*cljs

(get-joined-groups* config socket-id)
source

get-network-listclj/smacro

(get-network-list)

Retrieves information about local adapters on this system.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getNetworkList.

Retrieves information about local adapters on this system.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-getNetworkList.
sourceraw docstring

get-network-list*cljs

(get-network-list* config)
source

join-groupclj/smacro

(join-group socket-id address)

Join the multicast group and start to receive packets from that group. The socket must be of UDP type and must be bound to a local port before calling this method.

|socket-id| - The socketId. |address| - The group address to join. Domain names are not supported.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-joinGroup.

Join the multicast group and start to receive packets from that group. The socket must be of UDP type and must be bound to
a local port before calling this method.

  |socket-id| - The socketId.
  |address| - The group address to join. Domain names are not supported.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-joinGroup.
sourceraw docstring

join-group*cljs

(join-group* config socket-id address)
source

leave-groupclj/smacro

(leave-group socket-id address)

Leave the multicast group previously joined using joinGroup. It's not necessary to leave the multicast group before destroying the socket or exiting. This is automatically called by the OS.Leaving the group will prevent the router from sending multicast datagrams to the local host, presuming no other process on the host is still joined to the group.

|socket-id| - The socketId. |address| - The group address to leave. Domain names are not supported.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-leaveGroup.

Leave the multicast group previously joined using joinGroup. It's not necessary to leave the multicast group before
destroying the socket or exiting. This is automatically called by the OS.Leaving the group will prevent the router from
sending multicast datagrams to the local host, presuming no other process on the host is still joined to the group.

  |socket-id| - The socketId.
  |address| - The group address to leave. Domain names are not supported.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-leaveGroup.
sourceraw docstring

leave-group*cljs

(leave-group* config socket-id address)
source

listenclj/smacro

(listen socket-id address port)
(listen socket-id address port backlog)

This method applies to TCP sockets only. Listens for connections on the specified port and address. This effectively makes this a server socket, and client socket functions (connect, read, write) can no longer be used on this socket.

|socket-id| - The socketId. |address| - The address of the local machine. |port| - The port of the local machine. |backlog| - Length of the socket's listen queue.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-listen.

This method applies to TCP sockets only. Listens for connections on the specified port and address. This effectively makes
this a server socket, and client socket functions (connect, read, write) can no longer be used on this socket.

  |socket-id| - The socketId.
  |address| - The address of the local machine.
  |port| - The port of the local machine.
  |backlog| - Length of the socket's listen queue.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-listen.
sourceraw docstring

listen*cljs

(listen* config socket-id address port backlog)
source

readclj/smacro

(read socket-id)
(read socket-id buffer-size)

Reads data from the given connected socket.

|socket-id| - The socketId. |buffer-size| - The read buffer size.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [read-info] where:

|read-info| - https://developer.chrome.com/apps/socket#property-callback-readInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-read.

Reads data from the given connected socket.

  |socket-id| - The socketId.
  |buffer-size| - The read buffer size.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [read-info] where:

  |read-info| - https://developer.chrome.com/apps/socket#property-callback-readInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-read.
sourceraw docstring

read*cljs

(read* config socket-id buffer-size)
source

recv-fromclj/smacro

(recv-from socket-id)
(recv-from socket-id buffer-size)

Receives data from the given UDP socket.

|socket-id| - The socketId. |buffer-size| - The receive buffer size.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [recv-from-info] where:

|recv-from-info| - https://developer.chrome.com/apps/socket#property-callback-recvFromInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-recvFrom.

Receives data from the given UDP socket.

  |socket-id| - The socketId.
  |buffer-size| - The receive buffer size.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [recv-from-info] where:

  |recv-from-info| - https://developer.chrome.com/apps/socket#property-callback-recvFromInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-recvFrom.
sourceraw docstring

recv-from*cljs

(recv-from* config socket-id buffer-size)
source

secureclj/smacro

(secure socket-id)
(secure socket-id options)

Start a TLS client connection over a connected TCP client socket.

|socket-id| - The connected socket to use. |options| - Constraints and parameters for the TLS connection.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-secure.

Start a TLS client connection over a connected TCP client socket.

  |socket-id| - The connected socket to use.
  |options| - Constraints and parameters for the TLS connection.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-secure.
sourceraw docstring

secure*cljs

(secure* config socket-id options)
source

send-toclj/smacro

(send-to socket-id data address port)

Sends data on the given UDP socket to the given address and port.

|socket-id| - The socketId. |data| - The data to write. |address| - The address of the remote machine. |port| - The port of the remote machine.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [write-info] where:

|write-info| - https://developer.chrome.com/apps/socket#property-callback-writeInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-sendTo.

Sends data on the given UDP socket to the given address and port.

  |socket-id| - The socketId.
  |data| - The data to write.
  |address| - The address of the remote machine.
  |port| - The port of the remote machine.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [write-info] where:

  |write-info| - https://developer.chrome.com/apps/socket#property-callback-writeInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-sendTo.
sourceraw docstring

send-to*cljs

(send-to* config socket-id data address port)
source

set-keep-aliveclj/smacro

(set-keep-alive socket-id enable)
(set-keep-alive socket-id enable delay)

Enables or disables the keep-alive functionality for a TCP connection.

|socket-id| - The socketId. |enable| - If true, enable keep-alive functionality. |delay| - Set the delay seconds between the last data packet received and the first keepalive probe. Default is 0.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setKeepAlive.

Enables or disables the keep-alive functionality for a TCP connection.

  |socket-id| - The socketId.
  |enable| - If true, enable keep-alive functionality.
  |delay| - Set the delay seconds between the last data packet received and the first keepalive probe. Default is 0.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setKeepAlive.
sourceraw docstring

set-keep-alive*cljs

(set-keep-alive* config socket-id enable delay)
source

set-multicast-loopback-modeclj/smacro

(set-multicast-loopback-mode socket-id enabled)

Set whether multicast packets sent from the host to the multicast group will be looped back to the host.Note: the behavior of setMulticastLoopbackMode is slightly different between Windows and Unix-like systems. The inconsistency happens only when there is more than one application on the same host joined to the same multicast group while having different settings on multicast loopback mode. On Windows, the applications with loopback off will not RECEIVE the loopback packets; while on Unix-like systems, the applications with loopback off will not SEND the loopback packets to other applications on the same host. See MSDN: http://goo.gl/6vqbjCalling this method does not require multicast permissions.

|socket-id| - The socketId. |enabled| - Indicate whether to enable loopback mode.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setMulticastLoopbackMode.

Set whether multicast packets sent from the host to the multicast group will be looped back to the host.Note: the behavior
of setMulticastLoopbackMode is slightly different between Windows and Unix-like systems. The inconsistency happens only
when there is more than one application on the same host joined to the same multicast group while having different settings
on multicast loopback mode. On Windows, the applications with loopback off will not RECEIVE the loopback packets; while on
Unix-like systems, the applications with loopback off will not SEND the loopback packets to other applications on the same
host. See MSDN: http://goo.gl/6vqbjCalling this method does not require multicast permissions.

  |socket-id| - The socketId.
  |enabled| - Indicate whether to enable loopback mode.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setMulticastLoopbackMode.
sourceraw docstring

set-multicast-loopback-mode*cljs

(set-multicast-loopback-mode* config socket-id enabled)
source

set-multicast-time-to-liveclj/smacro

(set-multicast-time-to-live socket-id ttl)

Set the time-to-live of multicast packets sent to the multicast group.Calling this method does not require multicast permissions.

|socket-id| - The socketId. |ttl| - The time-to-live value.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setMulticastTimeToLive.

Set the time-to-live of multicast packets sent to the multicast group.Calling this method does not require multicast
permissions.

  |socket-id| - The socketId.
  |ttl| - The time-to-live value.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setMulticastTimeToLive.
sourceraw docstring

set-multicast-time-to-live*cljs

(set-multicast-time-to-live* config socket-id ttl)
source

set-no-delayclj/smacro

(set-no-delay socket-id no-delay)

Sets or clears TCP_NODELAY for a TCP connection. Nagle's algorithm will be disabled when TCP_NODELAY is set.

|socket-id| - The socketId. |no-delay| - If true, disables Nagle's algorithm.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [result] where:

|result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setNoDelay.

Sets or clears TCP_NODELAY for a TCP connection. Nagle's algorithm will be disabled when TCP_NODELAY is set.

  |socket-id| - The socketId.
  |no-delay| - If true, disables Nagle's algorithm.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [result] where:

  |result| - https://developer.chrome.com/apps/socket#property-callback-result.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-setNoDelay.
sourceraw docstring

set-no-delay*cljs

(set-no-delay* config socket-id no-delay)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.app.socket namespace.

Taps all valid non-deprecated events in chromex.app.socket namespace.
sourceraw docstring

writeclj/smacro

(write socket-id data)

Writes data on the given connected socket.

|socket-id| - The socketId. |data| - The data to write.

This function returns a core.async channel of type promise-chan which eventually receives a result value. Signature of the result value put on the channel is [write-info] where:

|write-info| - https://developer.chrome.com/apps/socket#property-callback-writeInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-write.

Writes data on the given connected socket.

  |socket-id| - The socketId.
  |data| - The data to write.

This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [write-info] where:

  |write-info| - https://developer.chrome.com/apps/socket#property-callback-writeInfo.

In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.

https://developer.chrome.com/apps/socket#method-write.
sourceraw docstring

write*cljs

(write* config socket-id data)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close