summaryrefslogtreecommitdiff
path: root/src/socket_base.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-05-20 10:40:36 +0200
committerMartin Lucina <martin@lucina.net>2012-05-20 10:40:36 +0200
commit2601b302685c48e6aa8f507d200f148397811fae (patch)
tree5103e3fab82394585df96be9892600ecfd55accc /src/socket_base.cpp
parent1d76284dee8e9b0735a26ee98a3edcd9f5208f09 (diff)
[WIP] UDP supportudp
Signed-off-by: Martin Lucina <martin@lucina.net>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r--src/socket_base.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 960bd2c..2442e72 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -208,7 +208,7 @@ int xs::socket_base_t::check_protocol (const std::string &protocol_)
{
// First check out whether the protcol is something we are aware of.
if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" &&
- protocol_ != "pgm" && protocol_ != "epgm") {
+ protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "udp") {
errno = EPROTONOSUPPORT;
return -1;
}
@@ -234,7 +234,7 @@ int xs::socket_base_t::check_protocol (const std::string &protocol_)
// Check whether socket type and transport protocol match.
// Specifically, multicast protocols can't be combined with
// bi-directional messaging patterns (socket types).
- if ((protocol_ == "pgm" || protocol_ == "epgm") &&
+ if ((protocol_ == "pgm" || protocol_ == "epgm" || protocol_ == "udp") &&
options.type != XS_PUB && options.type != XS_SUB &&
options.type != XS_XPUB && options.type != XS_XSUB) {
errno = ENOCOMPATPROTO;
@@ -359,7 +359,7 @@ int xs::socket_base_t::bind (const char *addr_)
return 0;
}
- if (protocol == "pgm" || protocol == "epgm") {
+ if (protocol == "pgm" || protocol == "epgm" || protocol == "udp") {
// For convenience's sake, bind can be used interchageable with
// connect for PGM and EPGM transports.