Changeset 31627 in project


Ignore:
Timestamp:
10/09/14 01:32:27 (5 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [50.185.254.109]: Add list of errors and message types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/websockets

    r31626 r31627  
    163163The main difference between {{with-websocket}} and {{with-concurrent-websocket}} is that messages are guaranteed to be delivered in order with {{with-websocket}}. This also means that no messages will be read into memory and processed unless a call is made to {{receive-message}}. This includes pong messages that may be sent in response to any pings sent in the background ping thread, if enabled. See the definition of {{ping-interval}} for more details on how background pings and pongs work.
    164164
     165A list of possible message types and their respective websocket codes:
     166
     167<table>
     168<tr><th>message type (symbol)</th><th>code</th></tr>
     169<tr><td>continuation</td><td>0</td></tr>
     170<tr><td>text</td><td>1</td></tr>
     171<tr><td>binary</td><td>2</td></tr>
     172<tr><td>connection-close</td><td>8</td></tr>
     173<tr><td>ping</td><td>9</td></tr>
     174<tr><td>pong</td><td>10</td></tr>
     175</table>
     176
    165177==== {{with-websocket}}
    166178<procedure>(with-websocket [procedure])</procedure>
     
    337349Returns the optype (or message type) of the fragment as a symbol.
    338350
     351=== Exceptions
     352
     353Possible exceptions and a brief description. See individual function definitions for details on when specific ones will be triggered.
     354
     355<table>
     356<tr><th>type</th><th>description</th></tr>
     357<tr><td>websocket</td><td>A part of every websocket error as a composite condition. You can use this as a catchall for all websocket related errors.</td></tr>
     358<tr><td>protocol-error</td><td>Anytime something happens that violates the websocket protocol. The {{msg}} error property will contain details on the protocol broken.</td></tr>
     359<tr><td>invalid-optype</td><td>If an invalid message type (optype) is passed into any method that takes it as an argument.</td></tr>
     360<tr><td>reserved-bits-not-supported</td><td>A frame had a reserved bit set.</td></tr>
     361<tr><td>message-too-large</td><td>A message exceeds the set {{(max-frame-size)}} or {{(max-message-size)}} parameters.</td></tr>
     362<tr><td>unhandled-optype</td><td>The implementation received a frame with an opcode it could not handle. The {{optype}} property contains the unhandleable optype (as produced by {{(opcode->optype)}}).</td></tr>
     363<tr><td>invalid-data</td><td>Currently only signaled when a text payload contains invalid UTF8 codepoints. The {{msg}} property will hold a description of the "invalid data".</td></tr>
     364<tr><td>missing-header-upgrade</td><td>The request does not contain an "upgrade" parameter or it is not set to "websocket".</td></tr>
     365<tr><td>connection-timeout</td><td>The connection has timed out.</td></tr>
     366<tr><td></td><td></td></tr>
     367</table>
     368
    339369=== Contributors
    340370
Note: See TracChangeset for help on using the changeset viewer.