arduino167librariesI2C/Ethernet/EthernetUdp.cpp
/* Start EthernetUDP socket, listening at local port PORT */
Start EthernetUDP socket, listening at local port PORT
Start EthernetUDP socket listening at local port PORT
uint8_t EthernetUDP::begin(uint16_t port) {
  if (_sock != MAX_SOCK_NUM)
    return 0;
  for (int i = 0; i < MAX_SOCK_NUM; i++) {
    uint8_t s = W5100.readSnSR(i);
    if (s == SnSR::CLOSED || s == SnSR::FIN_WAIT) {
      _sock = i;
      break;
    }
  }
  if (_sock == MAX_SOCK_NUM)
    return 0;
  _port = port;
  socket(_sock, SnMR::UDP, _port, 0);
  return 1;
}
uint8_t EthernetUDP :: begin ( uint16_t port ) { if ( _sock != MAX_SOCK_NUM ) return 0 ; for ( int i = 0 ; i < MAX_SOCK_NUM ; i ++ ) { uint8_t s = W5100 . readSnSR ( i ) ; if ( s == SnSR :: CLOSED || s == SnSR :: FIN_WAIT ) { _sock = i ; break ; } } if ( _sock == MAX_SOCK_NUM ) return 0 ; _port = port ; socket ( _sock , SnMR :: UDP , _port , 0 ) ; return 1 ; }
Start EthernetUDP socket, listening at local port PORT
Start EthernetUDP socket listening at local port PORT