Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <sys/socket.h>
  2.  
  3. int main(void)
  4. {
  5. // the data to send using send()
  6. int data = 10;
  7. // the socket you want to send the data on
  8. int socket;
  9.  
  10. // create and set up the socket here, according to your needs
  11.  
  12. // send the variable 'data' over the socket
  13. send(socket, &data, sizeof data, 0);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement