PageRenderTime 66ms CodeModel.GetById 42ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/src/flash/net/Socket.js

https://github.com/yurydelendik/shumway
JavaScript | 172 lines | 153 code | 0 blank | 19 comment | 0 complexity | c781e216fea12289ab14b69b1c4aa326 MD5 | raw file
  1/* -*- Mode: js; js-indent-level: 2; indent-tabs-mode: nil; tab-width: 2 -*- */
  2/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
  3/*
  4 * Copyright 2013 Mozilla Foundation
  5 *
  6 * Licensed under the Apache License, Version 2.0 (the "License");
  7 * you may not use this file except in compliance with the License.
  8 * You may obtain a copy of the License at
  9 *
 10 *     http://www.apache.org/licenses/LICENSE-2.0
 11 *
 12 * Unless required by applicable law or agreed to in writing, software
 13 * distributed under the License is distributed on an "AS IS" BASIS,
 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15 * See the License for the specific language governing permissions and
 16 * limitations under the License.
 17 */
 18 /*global throwError, Errors */
 19var SocketDefinition = (function () {
 20  return {
 21    // (host:String = null, port:int = 0)
 22    __class__: "flash.net.Socket",
 23    initialize: function () {
 24      this._connected = false;
 25    },
 26    __glue__: {
 27      native: {
 28        static: {
 29        },
 30        instance: {
 31          internalGetSecurityErrorMessage: function internalGetSecurityErrorMessage(host, port) { // (host:String, port:int) -> String
 32            somewhatImplemented("Socket.internalGetSecurityErrorMessage");
 33            return 'SecurityErrorEvent';
 34          },
 35          internalConnect: function internalConnect(host, port) { // (host:String, port:int) -> void
 36            somewhatImplemented("Socket.internalConnect");
 37            throwError('SecurityError', Errors.SocketConnectError, host, port);
 38          },
 39          didFailureOccur: function didFailureOccur() { // (void) -> Boolean
 40            somewhatImplemented("Socket.didFailureOccur");
 41            return true;
 42          },
 43          readBytes: function readBytes(bytes, offset, length) { // (bytes:ByteArray, offset:uint = 0, length:uint = 0) -> void
 44            notImplemented("Socket.readBytes");
 45          },
 46          writeBytes: function writeBytes(bytes, offset, length) { // (bytes:ByteArray, offset:uint = 0, length:uint = 0) -> void
 47            notImplemented("Socket.writeBytes");
 48          },
 49          writeBoolean: function writeBoolean(value) { // (value:Boolean) -> void
 50            notImplemented("Socket.writeBoolean");
 51          },
 52          writeByte: function writeByte(value) { // (value:int) -> void
 53            notImplemented("Socket.writeByte");
 54          },
 55          writeShort: function writeShort(value) { // (value:int) -> void
 56            notImplemented("Socket.writeShort");
 57          },
 58          writeInt: function writeInt(value) { // (value:int) -> void
 59            notImplemented("Socket.writeInt");
 60          },
 61          writeUnsignedInt: function writeUnsignedInt(value) { // (value:uint) -> void
 62            notImplemented("Socket.writeUnsignedInt");
 63          },
 64          writeFloat: function writeFloat(value) { // (value:Number) -> void
 65            notImplemented("Socket.writeFloat");
 66          },
 67          writeDouble: function writeDouble(value) { // (value:Number) -> void
 68            notImplemented("Socket.writeDouble");
 69          },
 70          writeMultiByte: function writeMultiByte(value, charSet) { // (value:String, charSet:String) -> void
 71            notImplemented("Socket.writeMultiByte");
 72          },
 73          writeUTF: function writeUTF(value) { // (value:String) -> void
 74            notImplemented("Socket.writeUTF");
 75          },
 76          writeUTFBytes: function writeUTFBytes(value) { // (value:String) -> void
 77            notImplemented("Socket.writeUTFBytes");
 78          },
 79          readBoolean: function readBoolean() { // (void) -> Boolean
 80            notImplemented("Socket.readBoolean");
 81          },
 82          readByte: function readByte() { // (void) -> int
 83            notImplemented("Socket.readByte");
 84          },
 85          readUnsignedByte: function readUnsignedByte() { // (void) -> uint
 86            notImplemented("Socket.readUnsignedByte");
 87          },
 88          readShort: function readShort() { // (void) -> int
 89            notImplemented("Socket.readShort");
 90          },
 91          readUnsignedShort: function readUnsignedShort() { // (void) -> uint
 92            notImplemented("Socket.readUnsignedShort");
 93          },
 94          readInt: function readInt() { // (void) -> int
 95            notImplemented("Socket.readInt");
 96          },
 97          readUnsignedInt: function readUnsignedInt() { // (void) -> uint
 98            notImplemented("Socket.readUnsignedInt");
 99          },
100          readFloat: function readFloat() { // (void) -> Number
101            notImplemented("Socket.readFloat");
102          },
103          readDouble: function readDouble() { // (void) -> Number
104            notImplemented("Socket.readDouble");
105          },
106          readMultiByte: function readMultiByte(length, charSet) { // (length:uint, charSet:String) -> String
107            notImplemented("Socket.readMultiByte");
108          },
109          readUTF: function readUTF() { // (void) -> String
110            notImplemented("Socket.readUTF");
111          },
112          readUTFBytes: function readUTFBytes(length) { // (length:uint) -> String
113            notImplemented("Socket.readUTFBytes");
114          },
115          internalClose: function internalClose() { // (void) -> void
116            notImplemented("Socket.internalClose");
117          },
118          flush: function flush() { // (void) -> void
119            notImplemented("Socket.flush");
120          },
121          writeObject: function writeObject(object) { // (object) -> void
122            notImplemented("Socket.writeObject");
123          },
124          readObject: function readObject() { // (void) -> any
125            notImplemented("Socket.readObject");
126          },
127          bytesAvailable: {
128            get: function bytesAvailable() { // (void) -> uint
129              notImplemented("Socket.bytesAvailable");
130              return this._bytesAvailable;
131            }
132          },
133          connected: {
134            get: function connected() { // (void) -> Boolean
135              somewhatImplemented("Socket.connected");
136              return this._connected;
137            }
138          },
139          objectEncoding: {
140            get: function objectEncoding() { // (void) -> uint
141              notImplemented("Socket.objectEncoding");
142              return this._objectEncoding;
143            },
144            set: function objectEncoding(version) { // (version:uint) -> void
145              notImplemented("Socket.objectEncoding");
146              this._objectEncoding = version;
147            }
148          },
149          endian: {
150            get: function endian() { // (void) -> String
151              notImplemented("Socket.endian");
152              return this._endian;
153            },
154            set: function endian(type) { // (type:String) -> void
155              notImplemented("Socket.endian");
156              this._endian = type;
157            }
158          },
159          bytesPending: {
160            get: function bytesPending() { // (void) -> uint
161              notImplemented("Socket.bytesPending");
162              return this._bytesPending;
163            }
164          }
165        }
166      },
167      script: {
168        instance: Glue.ALL
169      }
170    }
171  };
172}).call(this);