| 12345678910111213141516171819202122 |
- #pragma once
- #include <unistd.h>
- #include <arpa/inet.h>
- const uint16_t BUF_SIZE = 4096;
- struct buffer
- {
- uint16_t ptr, len;
- char buf[BUF_SIZE];
- };
- int sgetc(int clnt_sock, struct buffer *recv_buf);
- int sgetline(int clnt_sock, struct buffer *recv_buf, struct buffer *line_buf);
- int sflush(int clnt_sock, struct buffer *send_buf);
- int sputc(int clnt_sock, struct buffer *send_buf, char c);
- int sputline(int clnt_sock, struct buffer *send_buf, struct buffer *line_buf);
|