Method: Browser::Socket#type
- Defined in:
- opal/browser/socket.rb
#type ⇒ :blob, ... (readonly)
Returns the type of the socket.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'opal/browser/socket.rb', line 58 def type %x{ switch (#@native.binaryType) { case "blob": return "blob"; case "arraybuffer": return "buffer"; default: return "string"; } } end |