sockrecv
Prev | Orchestra Opcodes and Operators | Next

## sockrecv

sockrecv — Receives data from other processes using the low-level UDP or TCP protocols

## Description

Receives directly using the UDP (sockrecv and sockrecvs) or TCP (strecv) protocol onto a network. The data is not subject to any encoding or special routing. The sockrecvs opcode receives a stereo signal interleaved.

## Syntax

    asig sockrecv iport, ilength

    ksig sockrecv iport, ilength

    asigl, asigr sockrecvs iport, ilength

    asig strecv Sipaddr, iport

## Initialization

Sipaddr -- a string that is the IP address of the sender in standard 4-octet dotted form.

iport -- the number of the port that is used for the communication.

ilength -- the length of the individual packets in UDP transmission. This number must be sufficiently small to fit a single MTU, which is set to the save value of 1456. In UDP transmissions the sender and receiver needs agree on this value

## Performance

asig, asigl, asigr -- audio data to be received. ksig -- control data to be received.

## Example

The example shows a mono signal being received on port 7777 using UDP.

            sr = 44100
            ksmps = 100
            nchnls = 1

            instr   1
            a1 sockrecv   7777, 200
               out        a1
            endin

## Credits

Author: John ffitch
2006

Prev | Up | Next
sndwarpst | Home | socksend