diff options
author | moret <moret@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2008-08-05 14:06:37 +0000 |
---|---|---|
committer | moret <moret@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2008-08-05 14:06:37 +0000 |
commit | 2485a02d42748986a5f643ed5f06f3057db74b30 (patch) | |
tree | 782353a87e7ed5c377c865a336628a9e05a1745d /windows | |
parent | 56ad4a93d410443231324da789ad3f2337c33dff (diff) | |
download | jack2-2485a02d42748986a5f643ed5f06f3057db74b30.tar.gz |
Add JackNetInterface class hierarchy to share code between slave/master
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2773 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'windows')
-rw-r--r-- | windows/JackNetWinSocket.cpp | 28 | ||||
-rw-r--r-- | windows/JackNetWinSocket.h | 4 | ||||
-rw-r--r-- | windows/jacknetadapter.rc | 41 | ||||
-rw-r--r-- | windows/libjackservermp.cbp | 3 |
4 files changed, 65 insertions, 11 deletions
diff --git a/windows/JackNetWinSocket.cpp b/windows/JackNetWinSocket.cpp index 55c1ce78..02cbce3b 100644 --- a/windows/JackNetWinSocket.cpp +++ b/windows/JackNetWinSocket.cpp @@ -129,11 +129,30 @@ namespace Jack memset ( &fRecvAddr.sin_zero, 0, 8 ); } + JackNetWinSocket::JackNetWinSocket ( const JackNetWinSocket& socket ) + { + fSockfd = 0; + fPort = socket.fPort; + fSendAddr = socket.fSendAddr; + fRecvAddr = socket.fRecvAddr; + } + JackNetWinSocket::~JackNetWinSocket() { Close(); } + JackNetWinSocket& JackNetWinSocket::operator= ( const JackNetWinSocket& socket ) + { + if ( this != &socket ) + { + fSockfd = 0; + fPort = socket.fPort; + fSendAddr = socket.fSendAddr; + fRecvAddr = socket.fRecvAddr; + } + } + //socket*********************************************************************************************************** int JackNetWinSocket::NewSocket() { @@ -244,13 +263,6 @@ namespace Jack return SetOption ( IPPROTO_IP, 12, &multicast_req, sizeof ( multicast_req ) ); } - void JackNetWinSocket::CopyParams ( JackNetWinSocket* socket ) - { - fPort = socket->fPort; - fSendAddr = socket->fSendAddr; - fRecvAddr = socket->fRecvAddr; - } - //options************************************************************************************************************ int JackNetWinSocket::SetOption ( int level, int optname, const void* optval, SOCKLEN optlen ) { @@ -268,7 +280,7 @@ namespace Jack //negative timeout, or exceeding 10s, return if ( ( usec < 0 ) || ( usec > 10000000 ) ) return SOCKET_ERROR; - int time = usec / 1000; + int time = usec / 1000; return SetOption ( SOL_SOCKET, SO_RCVTIMEO, &time, sizeof ( time ) ); } diff --git a/windows/JackNetWinSocket.h b/windows/JackNetWinSocket.h index 044a01cd..ea091029 100644 --- a/windows/JackNetWinSocket.h +++ b/windows/JackNetWinSocket.h @@ -49,8 +49,11 @@ namespace Jack public: JackNetWinSocket(); JackNetWinSocket ( const char* ip, int port ); + JackNetWinSocket ( const JackNetWinSocket& ); ~JackNetWinSocket(); + JackNetWinSocket& operator= ( const JackNetWinSocket& ); + //socket management int NewSocket(); int Bind(); @@ -74,7 +77,6 @@ namespace Jack //utility int GetName ( char* name ); int JoinMCastGroup ( const char* mcast_ip ); - void CopyParams ( JackNetWinSocket* socket ); //options management int SetOption ( int level, int optname, const void* optval, SOCKLEN optlen ); diff --git a/windows/jacknetadapter.rc b/windows/jacknetadapter.rc new file mode 100644 index 00000000..859d6803 --- /dev/null +++ b/windows/jacknetadapter.rc @@ -0,0 +1,41 @@ +// Generated by ResEdit 1.4.3 +// Copyright (C) 2006-2008 +// http://www.resedit.net + +#include "resource.h" +#include "afxres.h" + + +// +// Version Information resources +// +LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT +1 VERSIONINFO + FILEVERSION 1,9,0,0 + PRODUCTVERSION 1,9,0,0 + FILEOS VOS_UNKNOWN + FILETYPE VFT_DLL +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040c04b0" + BEGIN + VALUE "Comments", "\0" + VALUE "CompanyName", "Grame\0" + VALUE "FileDescription", "Jackmp Net Adapter for Windows\0" + VALUE "FileVersion", "1, 9, 0, 0\0" + VALUE "InternalName", "jack_netadapter\0" + VALUE "LegalCopyright", "Copyright Grame © 2006-2008\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "jack_netadapter.dll\0" + VALUE "PrivateBuild", "\0" + VALUE "ProductName", "jack_netadapter\0" + VALUE "ProductVersion", "1, 9, 0, 0\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 1036, 1200 + END +END diff --git a/windows/libjackservermp.cbp b/windows/libjackservermp.cbp index 77642d3a..fb635ab2 100644 --- a/windows/libjackservermp.cbp +++ b/windows/libjackservermp.cbp @@ -124,7 +124,6 @@ </Build> <Compiler> <Add option="-Wall" /> - <Add option="-fexceptions" /> <Add directory="." /> <Add directory="..\common" /> <Add directory="..\common\jack" /> @@ -167,7 +166,7 @@ <Unit filename="..\common\JackMessageBuffer.cpp" /> <Unit filename="..\common\JackMidiAPI.cpp" /> <Unit filename="..\common\JackMidiPort.cpp" /> - <Unit filename="..\common\JackNetSlaveInterface.cpp" /> + <Unit filename="..\common\JackNetInterface.cpp" /> <Unit filename="..\common\JackNetTool.cpp" /> <Unit filename="..\common\JackPort.cpp" /> <Unit filename="..\common\JackPortType.cpp" /> |