well you need a chat software that should be browser based. my advice to you would be to use http tunneling instead of using the sockets.
you can have a database where you will store user info, room info and messages etc..
use Server side scripting(like ASP) to retrieve data from the database & redirect its output to an interface(like a java applet), through this interface the users will be doing the chat.
however for socket based chat take a look at
http://www.winsockvb.com/tutorials/chat/chat1.htmlfor readymade s/w, check this out
http://www.freevbcode.com/ShowCode.Asp?ID=858
Best Luck..
Nilesh