7

Is it possible for a browser-based irc client to work without using any gateway, that is, to communicate with the irc sever directly?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225

4 Answers4

12

HTML5 WebSockets are unable to make connections to non-WebSocket Servers. With WebSockets you can only connect to servers that can response to WebSocket Protocol Handshake requests. So no, you won't be able to use HTML5 to do an IRC Client (which is very sad since Flash is perfectly capable of doing this).

Spyro
  • 121
  • 1
  • 3
1

wsproxy can be used as intermediate layer to exchange messages. See other thread for more info

https://stackoverflow.com/questions/4176344/websocket-relay

Community
  • 1
  • 1
Rajender Saini
  • 594
  • 2
  • 9
  • 24
-1

Sure, as long as you're using an extension or browser language that can talk the IRC protocol, e.g. ChatZilla or PJIRC.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
-2

In the future this could be done with websockets, currently only chrome supports them but they are a part of the html 5 spec. http://dev.w3.org/html5/websockets/

This post suggests Kaazing has an in the mean time javascript work around: https://stackoverflow.com/questions/1252829/what-browsers-support-html-5-websocket

I'd expect that the workaround uses something like java or flash to simulate websockets.

Community
  • 1
  • 1
Michael
  • 3,498
  • 5
  • 27
  • 32
  • 5
    Are you sure about WebSockets? The site you linked to states: "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." – Adam Paynter Sep 16 '10 at 08:38
  • From all of the reading I've done so far, it looks like this answer is wrong. WebSockets don't work for direct connections to non-HTTP servers. – Steven Oxley Feb 24 '11 at 21:27
  • Just a wrong terminology ... it is [TCP Sockets](http://www.w3.org/2012/sysapps/tcp-udp-sockets/). Currently implemented in [Firefox OS](https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket), so for example [Firesea IRC](https://github.com/nickdesaulniers/fxos-irc) is possible. – mcepl Jun 09 '15 at 14:34