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 onerror();
25 static void halfclose();
26 static void suspend();
29 [nocompile] static boolean send(object data);
31 // send() can take up to four different types of arguments. We try to
32 // detect what kind of argument we have and route to a more specialized
35 [nodoc] static boolean sendDOMString(DOMString data);
36 [nodoc] static boolean sendBlob([instanceOf=Blob] object data);
37 [nodoc] static boolean sendArrayBuffer(ArrayBuffer data);
38 [nodoc] static boolean sendArrayBufferView([instanceOf=ArrayBufferView] object data);
40 [nodoc] static void init(DOMString remoteAddress,
42 optional TCPOptions options);
43 [nodoc] static void destroy();