summaryrefslogtreecommitdiff
path: root/util.h
blob: 5457ffeba87a5e48b48a5eddc8f65b3ace36b7fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#pragma once

#include <sys/socket.h>


char* copy_buf(const char *buf,int len);
char* copy_str(const char *str);

void str_toupper(char *str);

// Returns -1 on error, 0 on success
int sendall(int sock,const char *buf,ssize_t len);
int sendallf(int sock,const char *format,...) __attribute__((format (printf, 2, 3)));