BINARY (JANUS DEFINE parameter)

From m204wiki
Jump to navigation Jump to search

Set BINARY mode for socket ports

BINARY is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.

This parameter requests Janus Sockets to send and receive strings with Janus Sockets $functions or Socket methods using no translation. This can be useful if the Janus Sockets User Language application is doing its own translation, or if no translation is required.

Input and output translation can be enabled for a socket by either of the following:

  • Setting a socket to CHAR using $Sock_Set or the Set function of the Socket class
  • Using the CHAR option on an individual receive or send Janus Sockets $function or Socket class method

Character translation is automatic for the socket if you are using the HTTP Helper.

Individual strings can be translated using $Sock_Tran_In or $Sock_Tran_Out or their Socket method counterparts, TranIn or TranOut.

Translation is determined by the tables defined by the socket's XTAB setting.

The CHAR parameter is the opposite of BINARY. CHAR is the default.

Valid only for CLSOCK and SRVSOCK ports.

See also