in reply to MSN Library/Client

Why are you reading packets via libpcap? Do you really want to manage your own tcp stack? You should focus on the chat protocol, not all of the extra foo you have to do in order to implement your own TCP stack.