Project

General

Profile

Actions

Feature #798

open

Add Irccd.Socket API

Added by David Demelier almost 5 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Category:
irccd
Target version:
Start date:
04/16/2018
Due date:
% Done:

0%

Estimated time:
8.00 h
Branch:
default
Platform:

Description

Create an asynchronous Irccd.Socket API for communicating with internet and local sockets.

Server class

This object only have one function for accepting clients.

  • Server(options): create a server object,
  • Server.prototype.accept(handler): wait for a client and call the handler.

Socket class

  • Socket(type): create a socket,
  • Socket.prototype.connect(options, handler): connect to the given endpoint,
  • Socket.prototype.write(data, handler): write some data to the socket,
  • Socket.prototype.read(amount, handler): read some data from the socket,
  • Socket.prototype.readline(delimiter, handler): convenient handler that reads until a delimiter,
  • Socket.prototype.close(handler = null): close gracefully the socket.
Actions #1

Updated by David Demelier over 2 years ago

  • Target version changed from 3.1.0 to 4.0.0
Actions #2

Updated by David Demelier about 1 year ago

  • Target version deleted (4.0.0)
Actions #3

Updated by David Demelier about 1 year ago

  • Target version set to 4.1.0
Actions

Also available in: Atom PDF