Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Header for the data structures used in various connection functions
- #ifndef _IRC_NETSTRUCTS_H_
- #define _IRC_NETSTRUCTS_H_
- #include <stdbool.h>
- //Used to hold information regarding the current network we're connected to. Used by almost all the functions
- struct irc_network {
- //Information used to make the connection
- char * hostname;
- char * port;
- //Information regarding the connection status (current user info, etc.)
- char * network_name;
- char * nickname;
- char * realname;
- char * username;
- char * user_hostname;
- //Internal connection stuff
- int __socket;
- char __read_buf[513]; //Contains the buffer for __irc_read
- char * __read_cursor; //The current beggining of the free space in the buffer
- bool __data_waiting; //Indicates if there are more messages left in __read_buf
- size_t __last_recv_len; //Stores the length of the last packet returned by recv
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement