You can keep a TCP Socket active and alive forever with PubNub's unlimited TTL Socket Session Policy by writing an initial data payload over the socket.
> telnet pubsub.pubnub.com 80
After you've established the TCP connection, send the following payload:
GET /time/0 HTTP/1.1 Host: pubnub
Don't forget the add the line break carriage returns into the socket write (transmit) buffer like this:
GET /time/0 HTTP/1.1\r\n Host: pubnub\r\n\r\n
Now the TCP Socket will remain open Forever with PubNub's unlimited TCP Lifetime Policy. Hurray! Give it a try yourself right now.
To constantly stream messages over PubNub you can issue a ~stream~ API call:
GET /stream/demo/CHANNEL-A/0/1000 HTTP/1.1 Host: pubnub
If you want to send a message over telnet, you can issue a publish call:
GET /publish/demo/demo/0/CHANNEL-A/0/"Hi" HTTP/1.1 Host: pubnub GET /publish/demo/demo/0/CHANNEL-A/0/"Hello" HTTP/1.1 Host: pubnub GET /publish/demo/demo/0/CHANNEL-A/0/"Whatsup" HTTP/1.1 Host: pubnub