connect.socket(rzmq)
connect.socket()所属R语言包:rzmq
Connect the socket referenced by the socket argument to the endpoint specified by the endpoint argument.
的插座参数引用的套接字连接到指定的端点由端点参数。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The zmq_connect() function shall connect the socket referenced by the socket argument to the endpoint specified by the endpoint argument.
的zmq_connect()函数将连接到指定的端点由端点参数的插座参数引用的套接字。
The endpoint argument is a string consisting of two parts as follows: transport ://address. The transport part specifies the underlying transport protocol to use. The meaning of the address part is specific to the underlying transport protocol selected.
端点参数是一个字符串,它由两部分组成如下:运输:/ /地址。运输部分指定使用的底层传输协议。的地址部分的含义是特定于底层传输协议选择。
The following transports are defined:
下面的传输定义如下:
inproc local in-process (inter-thread) communication transport, see zmq_inproc(7) ipc local inter-process communication transport, see zmq_ipc(7) tcp unicast transport using TCP, see zmq_tcp(7) pgm, epgm reliable multicast transport using PGM, see zmq_pgm(7) With the exception of ZMQ_PAIR sockets, a single socket may be connected to multiple endpoints using zmq_connect(), while simultaneously accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(). Refer to zmq_socket(3) for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints.
INPROC本地进程(线程间)通信传输,,看到zmq_inproc(7)IPC的本地进程间的通信传输,请参阅zmq_ipc(7)使用TCP的TCP单播传输,使用PGM PGM,zmq_tcp(7)epgm可靠多播传输随着异常ZMQ_PAIR套接字,请参阅zmq_pgm(7),一个单一的插座可连接到多个端点使用zmq_connect(),同时接受从多个绑定到插座使用zmq_bind()的端点的传入的连接。的确切语义的说明涉及到连接时,或一个套接字绑定到多个端点,请参阅zmq_socket(3)。
用法----------Usage----------
connect.socket(socket, address)
参数----------Arguments----------
参数:socket
a zmq socket object.
一个,ZMQ插座的对象。
参数:address
a transport as described above.
如上所述的传输。
值----------Value----------
TRUE if operation succeeds or FALSE if the operation fails
TRUE,如果操作成功或FALSE如果操作失败,
(作者)----------Author(s)----------
ZMQ was written by Martin Sustrik <sustrik@250bpm.com> and Martin Lucina <mato@kotelna.sk>.
rzmq was written by Whit Armstrong.
参考文献----------References----------
http://www.zeromq.org http://api.zeromq.org http://zguide.zeromq.org/page:all
参见----------See Also----------
connect.socket,bind.socket,receive.socket,send.socket
connect.socket,bind.socket,receive.socket,send.socket
实例----------Examples----------
library(rzmq)
context = init.context()
in.socket = init.socket(context,"ZMQ_PULL")
bind.socket(in.socket,"tcp://*:5557")
out.socket = init.socket(context,"ZMQ_PUSH")
bind.socket(out.socket,"tcp://*:5558")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|