summaryrefslogtreecommitdiff
path: root/src/mailbox.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:01:47 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:01:47 +0900
commit4a7aad06d95701cf232198093ce396dcdbb53e5b (patch)
tree8ced8929e603a179d9434099244dfd782e705d5e /src/mailbox.cpp
parent1fc63e4dbcf1438eb571d720f57be68852f820f7 (diff)
ZeroMQ renamed to Crossroads
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/mailbox.cpp')
-rw-r--r--src/mailbox.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mailbox.cpp b/src/mailbox.cpp
index ff16afe..d3c6697 100644
--- a/src/mailbox.cpp
+++ b/src/mailbox.cpp
@@ -1,16 +1,16 @@
/*
- Copyright (c) 2009-2011 250bpm s.r.o.
+ Copyright (c) 2009-2012 250bpm s.r.o.
Copyright (c) 2007-2009 iMatix Corporation
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
- This file is part of 0MQ.
+ This file is part of Crossroads project.
- 0MQ is free software; you can redistribute it and/or modify it under
+ Crossroads is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
- 0MQ is distributed in the hope that it will be useful,
+ Crossroads is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
@@ -22,27 +22,27 @@
#include "mailbox.hpp"
#include "err.hpp"
-zmq::mailbox_t::mailbox_t ()
+xs::mailbox_t::mailbox_t ()
{
// Get the pipe into passive state. That way, if the users starts by
// polling on the associated file descriptor it will get woken up when
// new command is posted.
bool ok = cpipe.read (NULL);
- zmq_assert (!ok);
+ xs_assert (!ok);
active = false;
}
-zmq::mailbox_t::~mailbox_t ()
+xs::mailbox_t::~mailbox_t ()
{
// TODO: Retrieve and deallocate commands inside the cpipe.
}
-zmq::fd_t zmq::mailbox_t::get_fd ()
+xs::fd_t xs::mailbox_t::get_fd ()
{
return signaler.get_fd ();
}
-void zmq::mailbox_t::send (const command_t &cmd_)
+void xs::mailbox_t::send (const command_t &cmd_)
{
sync.lock ();
cpipe.write (cmd_, false);
@@ -52,7 +52,7 @@ void zmq::mailbox_t::send (const command_t &cmd_)
signaler.send ();
}
-int zmq::mailbox_t::recv (command_t *cmd_, int timeout_)
+int xs::mailbox_t::recv (command_t *cmd_, int timeout_)
{
// Try to get the command straight away.
if (active) {
@@ -76,7 +76,7 @@ int zmq::mailbox_t::recv (command_t *cmd_, int timeout_)
// Get a command.
errno_assert (rc == 0);
bool ok = cpipe.read (cmd_);
- zmq_assert (ok);
+ xs_assert (ok);
return 0;
}