network.h 976 B

123456789101112131415161718192021222324252627282930
  1. /* This file is part of libepistle.
  2. *
  3. * libepistle is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * libepistle is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with libepistle. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef EPISTLE_NETWORK_H
  17. #define EPISTLE_NETWORK_H
  18. #include <arpa/inet.h>
  19. #include <primo/err.h>
  20. int
  21. network_server(uint16_t port, int backlog, Err *err);
  22. int
  23. network_client(struct in6_addr in6_addr, uint16_t port, Err *err);
  24. #endif