# Poco::Net

# template < std::size_t S = (1472 + sizeof (UDPMsgSizeT)+ SocketAddress::MAX_ADDRESS_LENGTH), typename P = SingleSocketPoller < S >>

# class UDPServerImpl

Library: Net
Package: UDP
Header: Poco/Net/UDPServer.h

## Description

UDP server, runs in its own thread and owns a poller, to which data arrival and discovery is delegated. See SingleSocketPoller and MultipleSocketPoller for more information.

## Inheritance

Direct Base Classes: Poco::Runnable

All Base Classes: Poco::Runnable

## Member Summary

Member Functions: UDPServerImpl, address, port, run

Inherited Functions: run

## Destructor

### ~UDPServerImpl

~UDPServerImpl();

Destroys the UDPServer.

## Member Functions

### UDPServerImpl

UDPServerImpl(
typename UDPHandlerImpl < S >::List & handlers,
const Poco::Net::SocketAddress & sa
);

Creates the UDPServer and binds it to the given address.

### UDPServerImpl

UDPServerImpl(
typename UDPHandlerImpl < S >::List & handlers,
const UDPServerParams & params
);

Creates the UDPServer and binds it to the given address.

### address

Poco::Net::SocketAddress address() const;

Returns the address of the server.

### port

Poco::UInt16 port() const;

Returns the port the server is listening on.

### run

void run();

Does the work.

See also: Poco::Runnable::run()