1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // RawSocket API - TCPSocket
7 dictionary TCPOptions {
8 DOMString localAddress;
12 boolean useSecureTransport;
16 static void ondrain();
18 static void onclose();
19 static void onhalfclose();
20 static void onerror();
26 static void halfclose();
27 static void suspend();
30 [nocompile] static boolean send(object data);
32 // send() can take up to four different types of arguments. We try to
33 // detect what kind of argument we have and route to a more specialized
36 [nodoc] static boolean sendDOMString(DOMString data);
37 [nodoc] static boolean sendBlob([instanceOf=Blob] object data);
38 [nodoc] static boolean sendArrayBuffer(ArrayBuffer data);
39 [nodoc] static boolean sendArrayBufferView([instanceOf=ArrayBufferView] object data);
41 [nodoc] static void init(DOMString remoteAddress,
43 optional TCPOptions options);
44 [nodoc] static void destroy();