PageRenderTime 54ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/man/bind.socket.Rd

https://github.com/brotchie/rzmq
Unknown | 56 lines | 48 code | 8 blank | 0 comment | 0 complexity | f33eb03e793af408106b8fc6a33dcc37 MD5 | raw file
  1. \name{bind.socket}
  2. \alias{bind.socket}
  3. \title{
  4. Create an endpoint for accepting connections and bind it to the socket referenced by the socket argument.
  5. }
  6. \description{
  7. The zmq_bind() function shall create an endpoint for accepting connections and bind it to the socket referenced by the socket argument.
  8. 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.
  9. The following transports are defined:
  10. inproc
  11. local in-process (inter-thread) communication transport, see zmq_inproc(7)
  12. ipc
  13. local inter-process communication transport, see zmq_ipc(7)
  14. tcp
  15. unicast transport using TCP, see zmq_tcp(7)
  16. pgm, epgm
  17. reliable multicast transport using PGM, see zmq_pgm(7)
  18. 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.
  19. }
  20. \usage{
  21. bind.socket(socket, address)
  22. }
  23. \arguments{
  24. \item{socket}{a zmq socket object.}
  25. \item{address}{a transport as described above.}
  26. }
  27. \value{TRUE if operation succeeds or FALSE if the operation fails}
  28. \references{
  29. http://www.zeromq.org
  30. http://api.zeromq.org
  31. http://zguide.zeromq.org/page:all
  32. }
  33. \author{
  34. ZMQ was written by Martin Sustrik <sustrik@250bpm.com> and Martin Lucina <mato@kotelna.sk>.
  35. rzmq was written by Whit Armstrong.
  36. }
  37. \seealso{
  38. \code{\link{connect.socket},\link{bind.socket},\link{receive.socket},\link{send.socket},\link{poll.socket}}
  39. }
  40. \examples{\dontrun{
  41. library(rzmq)
  42. context = init.context()
  43. in.socket = init.socket(context,"ZMQ_PULL")
  44. bind.socket(in.socket,"tcp://*:5557")
  45. out.socket = init.socket(context,"ZMQ_PUSH")
  46. bind.socket(out.socket,"tcp://*:5558")
  47. }}
  48. \keyword{utilities}