aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/Sockets.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-01-11 19:27:48 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-01-11 20:17:43 +0100
commit8639fee50452ac51c9963e7cb51e82989efbb5f1 (patch)
tree10aea29fb2e62b6d25100262ed8f353bde1aa355 /CommonLibs/Sockets.cpp
parentca46896cfe881990defb34b7cd6c7e337f1bcc76 (diff)
Remove UDDSocket class
This class is not used anymore in osmo-trx, so we can safely remove it. Change-Id: I67f90aa3d6a2a5e92292436d10928e0705c8f8ff
Diffstat (limited to 'CommonLibs/Sockets.cpp')
-rw-r--r--CommonLibs/Sockets.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/CommonLibs/Sockets.cpp b/CommonLibs/Sockets.cpp
index 11e96dd..ce8e3d5 100644
--- a/CommonLibs/Sockets.cpp
+++ b/CommonLibs/Sockets.cpp
@@ -284,51 +284,4 @@ unsigned short UDPSocket::port() const
return ntohs(name.sin_port);
}
-
-
-
-
-UDDSocket::UDDSocket(const char* localPath, const char* remotePath)
- :DatagramSocket()
-{
- if (localPath!=NULL) open(localPath);
- if (remotePath!=NULL) destination(remotePath);
-}
-
-
-
-void UDDSocket::open(const char* localPath)
-{
- // create
- mSocketFD = socket(AF_UNIX,SOCK_DGRAM,0);
- if (mSocketFD<0) {
- perror("socket() failed");
- throw SocketError();
- }
-
- // bind
- struct sockaddr_un address;
- size_t length = sizeof(address);
- bzero(&address,length);
- address.sun_family = AF_UNIX;
- strcpy(address.sun_path,localPath);
- unlink(localPath);
- if (bind(mSocketFD,(struct sockaddr*)&address,length)<0) {
- perror("bind() failed");
- throw SocketError();
- }
-}
-
-
-
-void UDDSocket::destination(const char* remotePath)
-{
- struct sockaddr_un* unAddr = (struct sockaddr_un*)mDestination;
- unAddr->sun_family = AF_UNIX;
- strcpy(unAddr->sun_path,remotePath);
-}
-
-
-
-
// vim:ts=4:sw=4