WebSocketPrivate is a chrome private feature that allows Chome Apps to directly talks to any service running over TCP. WebSocket is designed with a most important characteristics that Browser should not be able to establish RAW TCP connection using scripts. If you read the webSocket specification from http://dev.w3.org/html5/websockets/ you can clearly understand that.
“This interface does not allow for raw access to the underlying network. For example, this interface could not be used to implement an IRC client without proxying messages through a custom server.”
Chrome has provided a feature that allows Chrome Apps to create RAW TCP connections using scripts. Chrome provides this feature only for scripts running in privileged domain chrome-extension://. It has two API’s. Keeping security in mind, Chrome permits this feature only for few extensions.
Google is going to deprecate getPassportForTCP() function in the future and they have introduced a new API named getURLForTCP(). We can learn about the API usage through their test case and chrome checkin log. getURLForTCP() accepts hostname, port number and call back function. We can extract some useful information from two places.