Does anyone know how Xchat communicate with IRC server? I'm looking for a IRC request message or Xchat request message with each other.
XChat, like all IRC clients, communicates with the IRC server using the IRC protocol, which have specification in RFC1459 and RFC2812.
XChat also has a "Raw Log" option hidden in it's menu under Window
-> Raw Log...
which you can use to see all the traffic between XChat and the server.