emailjs-tcp-socket
Version:
This shim brings the W3C Raw Socket API to node.js and Chromium. Its purpose is to enable apps to use the same api in Firefox OS, Chrome OS, and on the server.
11 lines (9 loc) • 370 B
JavaScript
export const EVENT_INBOUND = 'inbound'
export const EVENT_OUTBOUND = 'outbound'
export const EVENT_OPEN = 'open'
export const EVENT_CLOSE = 'close'
export const EVENT_ERROR = 'error'
export const EVENT_CONFIG = 'configure'
export const EVENT_CERT = 'cert'
export const EVENT_HANDSHAKE = 'handshake'
export const createMessage = (event, message) => ({ event, message })