Skip to content

Commit

Permalink
Tweak to library
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebenezer-group committed Dec 2, 2024
1 parent 6d3b85d commit f3b5db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmwBuffer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ struct FileBuffer{
};
#endif

inline int sockRead (sockType s,void* data,int len,sockaddr* addr,socklen_t* fromLen){
inline int sockRead (sockType s,void* data,int len,::sockaddr* addr,socklen_t* fromLen){
if(int r=::recvfrom(s,static_cast<char*>(data),len,0,addr,fromLen);r>=0)
return r;
raise("sockRead",len,getError());
Expand Down Expand Up @@ -615,7 +615,7 @@ inline int preserveError (int s){
inline int udpServer (::uint16_t port){
int s=::socket(AF_INET,SOCK_DGRAM,0);
::sockaddr_in sa{AF_INET,::htons(port),{},{}};
if(0==::bind(s,reinterpret_cast<sockaddr*>(&sa),sizeof sa))return s;
if(0==::bind(s,reinterpret_cast<::sockaddr*>(&sa),sizeof sa))return s;
raise("udpServer",preserveError(s));
}

Expand Down

0 comments on commit f3b5db3

Please sign in to comment.