2011-05-04 06:36:23 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
|
|
|
|
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-05-04 06:36:23 -07:00
|
|
|
|
|
|
|
include protocol PNecko;
|
|
|
|
include protocol PBrowser;
|
|
|
|
|
|
|
|
include "mozilla/net/NeckoMessageUtils.h";
|
|
|
|
|
|
|
|
using IPC::URI;
|
2011-12-15 15:20:17 -08:00
|
|
|
using IPC::InputStream;
|
2012-08-06 21:47:48 -07:00
|
|
|
using IPC::SerializedLoadContext;
|
2011-05-04 06:36:23 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace net {
|
|
|
|
|
|
|
|
async protocol PWebSocket
|
|
|
|
{
|
|
|
|
manager PNecko;
|
|
|
|
|
|
|
|
parent:
|
2011-07-04 21:18:33 -07:00
|
|
|
// Forwarded methods corresponding to methods on nsIWebSocketChannel
|
2012-07-22 15:35:33 -07:00
|
|
|
AsyncOpen(URI aURI,
|
|
|
|
nsCString aOrigin,
|
|
|
|
nsCString aProtocol,
|
|
|
|
bool aSecure,
|
2012-08-06 21:47:48 -07:00
|
|
|
SerializedLoadContext loadContext);
|
2011-08-03 12:15:25 -07:00
|
|
|
Close(PRUint16 code, nsCString reason);
|
2011-05-04 06:36:23 -07:00
|
|
|
SendMsg(nsCString aMsg);
|
|
|
|
SendBinaryMsg(nsCString aMsg);
|
2011-12-15 15:20:17 -08:00
|
|
|
SendBinaryStream(InputStream aStream, PRUint32 aLength);
|
2011-05-04 06:36:23 -07:00
|
|
|
|
|
|
|
DeleteSelf();
|
|
|
|
|
|
|
|
child:
|
|
|
|
// Forwarded notifications corresponding to the nsIWebSocketListener interface
|
2011-08-03 20:46:13 -07:00
|
|
|
OnStart(nsCString aProtocol, nsCString aExtensions);
|
2011-05-04 06:36:23 -07:00
|
|
|
OnStop(nsresult aStatusCode);
|
|
|
|
OnMessageAvailable(nsCString aMsg);
|
|
|
|
OnBinaryMessageAvailable(nsCString aMsg);
|
|
|
|
OnAcknowledge(PRUint32 aSize);
|
2011-08-03 12:15:25 -07:00
|
|
|
OnServerClose(PRUint16 code, nsCString aReason);
|
2011-05-04 06:36:23 -07:00
|
|
|
|
|
|
|
__delete__();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} //namespace net
|
|
|
|
} //namespace mozilla
|