Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0
Public.Storage.Manta 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Module Information
Public.ZeroMQ
Viewing contents of Public_ZeroMQ-1.1/testcl.pike

int main(int argc, array argv) {

  object ctx = Public.ZeroMQ.Context();
  object sock = Public.ZeroMQ.Socket(ctx, Public.ZeroMQ.PUB);
  object sock2 = Public.ZeroMQ.Socket(ctx, Public.ZeroMQ.PUB);
  sock->bind("tcp://127.0.0.1:5555");
  sock2->bind("tcp://127.0.0.1:5555");
  int rv;
  int i;
  while(rv >= 0) {
	    rv = sock->send( ({Public.ZeroMQ.Message("Foo"), Public.ZeroMQ.Message("Bar"), Public.ZeroMQ.Message("Gazonk") }) );
    rv = sock->send( ({Public.ZeroMQ.Message("Foo"), Public.ZeroMQ.Message("Bar"), Public.ZeroMQ.Message("Gazonk") }) );
    rv = sock->send( ({Public.ZeroMQ.Message("Foo"), Public.ZeroMQ.Message("Bar"), Public.ZeroMQ.Message("Gazonk") }) );
werror("rv: %O\n", rv);
//    rv = sock->send(Public.ZeroMQ.Message("" + i++), 0);
werror("rv: %O\n", rv);
	//werror("return code: " + rv + "\n");
//return 0;
  }
  return 0;
}


gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University