Advertisement
Lyude

Untitled

Mar 16th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.89 KB | None | 0 0
  1. //Header for the data structures used in various connection functions
  2. #ifndef _IRC_NETSTRUCTS_H_
  3. #define _IRC_NETSTRUCTS_H_
  4.  
  5. #include <stdbool.h>
  6.  
  7. //Used to hold information regarding the current network we're connected to. Used by almost all the functions
  8. struct irc_network {
  9.     //Information used to make the connection
  10.     char * hostname;
  11.     char * port;
  12.  
  13.     //Information regarding the connection status (current user info, etc.)
  14.     char * network_name;
  15.     char * nickname;
  16.     char * realname;
  17.     char * username;
  18.     char * user_hostname;
  19.  
  20.     //Internal connection stuff
  21.     int __socket;
  22.     char __read_buf[513];   //Contains the buffer for __irc_read
  23.     char * __read_cursor;   //The current beggining of the free space in the buffer
  24.     bool __data_waiting;    //Indicates if there are more messages left in __read_buf
  25.     size_t __last_recv_len; //Stores the length of the last packet returned by recv
  26. };
  27.  
  28.  
  29. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement