text: // Copyright (c) 2011-2016 The Skytells developers
  // Distributed under the MIT/X11 software license, see the accompanying
  // @license MIT : http://www.opensource.org/licenses/mit-license.php.
  // @package Oxgram Cryptocurrency by Skytells, Inc.
  
  #pragma once
  
  #include <cstdint>
  #include <string>
  
  namespace System {
  
  class Dispatcher;
  class Ipv4Address;
  class TcpConnection;
  
  class TcpListener {
  public:
    TcpListener();
    TcpListener(Dispatcher& dispatcher, const Ipv4Address& address, uint16_t port);
    TcpListener(const TcpListener&) = delete;
    TcpListener(TcpListener&& other);
    ~TcpListener();
    TcpListener& operator=(const TcpListener&) = delete;
    TcpListener& operator=(TcpListener&& other);
    TcpConnection accept();
  
  private:
    Dispatcher* dispatcher;
    int listener;
    void* context;
  };
  
  }
  