Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int SendBinary(int *byte, int length)
- {
- int bytes_sent;
- bytes_sent = send(connecting_socket, byte, length, 0);
- return bytes_sent;
- return 0;
- }
- void SendFile(FILE *fp, int file_size)
- {
- int current_char = 0;
- do{
- current_char = fgetc(fp);
- if ( current_char == EOF )
- break;
- SendBinary(¤t_char, sizeof(char));
- }
- while(current_char != EOF);
- }
Add Comment
Please, Sign In to add comment