#ifndef _Sender_h
#define _Sender_h

BOOL
M(Sender,Open)(HTLIB_HANDLE o,
		   const struct sockaddr* addr,
		   socklen_t addr_len,
		   HTLIB_ERROR* err);

void
M(Sender,Close)(HTLIB_HANDLE o);

BOOL
M(Sender,SendRequest)(HTLIB* o,
					  int timeout_millis,
					  const char* method,
					  const char* url,
					  const HTLIB_Header* headers,
					  HTLIB_USHORT header_len,
					  const char* body,
					  HTLIB_ULONGLONG body_len,
					  HTLIB_ERROR* err);

BOOL
M(Sender,SendResponse)(HTLIB_HANDLE o,
				   int timeout_millis,
				   int status, const char* msg,
				  const HTLIB_Header* headers,
				  HTLIB_USHORT header_len,
				  const char* body,
				  HTLIB_ULONGLONG body_len,
				   HTLIB_ERROR* err);

BOOL
M(Sender,SendBody)(HTLIB_HANDLE o,
			   int timeout_millis,
			   const char* body,
			   HTLIB_USHORT body_len,
			   HTLIB_ERROR* err);

#endif
