Commit Graph

10023 Commits

Author SHA1 Message Date
sleepycatcoding 5144162e68 avm2: Set timeout in AS3 constructor 2023-07-23 09:13:01 +02:00
sleepycatcoding 568d8dfe11 core: Fix panic when socket is closed before connecting 2023-07-23 09:13:01 +02:00
sleepycatcoding b46cc2aadc desktop: remove unneeded comment 2023-07-23 09:13:01 +02:00
sleepycatcoding 486c0ca149 web, tests: Ignore timeout parameter 2023-07-23 09:13:01 +02:00
sleepycatcoding c0ebafdb95 desktop: Use provided timeout when connecting 2023-07-23 09:13:01 +02:00
sleepycatcoding 6e6205d20d core: Use timeout in Navigator::connect_socket 2023-07-23 09:13:01 +02:00
sleepycatcoding f54e0e9097 avm2: Make get/setTimeout native 2023-07-23 09:13:01 +02:00
sleepycatcoding a3a49335eb chore: Fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding 6c3b6e5109 avm2: Implement read/writeObject() 2023-07-23 09:13:01 +02:00
sleepycatcoding ea3d6e2a5c avm2: Implement set/getobjectEncoding() 2023-07-23 09:13:01 +02:00
sleepycatcoding 9de2912765 avm2: Implement read/writeMultiByte() 2023-07-23 09:13:01 +02:00
sleepycatcoding 5ed9dbc16b avm2: Implement read/writeUTF 2023-07-23 09:13:01 +02:00
sleepycatcoding 6ca6bb1d78 avm2: Implement read/writeUTFBytes 2023-07-23 09:13:01 +02:00
sleepycatcoding ad51041457 avm2: Implement readBytes() 2023-07-23 09:13:01 +02:00
sleepycatcoding e1a82570fe avm2: small cleanup 2023-07-23 09:13:01 +02:00
sleepycatcoding df4ee7fe05 Chore: Fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding 2bcfc25b9f desktop: Add socket behavior to OpenDialog 2023-07-23 09:13:01 +02:00
sleepycatcoding 22eb150756 desktop: add SocketBehavior and host whitelist
This adds a way to modify socket behavior to restrict, ask, or allow all
connections. Also adds a whitelist which can be used to allow specific hosts
without enabiling ask or allow all behaviors.
2023-07-23 09:13:01 +02:00
sleepycatcoding 4c540c9f17 avm2: Implement read/writeBoolean() 2023-07-23 09:13:01 +02:00
sleepycatcoding 437187a7bd tests: Log socket connections on test backend 2023-07-23 09:13:01 +02:00
sleepycatcoding 45d3e141f8 avm2: Improve IOErrorEvent for Socket
IOErrorEvent now uses a error message and ID.
2023-07-23 09:13:01 +02:00
sleepycatcoding 0699c34881 chore: Fmt 2023-07-23 09:13:01 +02:00
sleepycatcoding 676516a99c core: use get instead of get_mut
We did not need mutability for this.
2023-07-23 09:13:01 +02:00
sleepycatcoding ea7264eab5 core: Dispatch IOErrorEvent when connection fails 2023-07-23 09:13:01 +02:00
sleepycatcoding d1a17ebeb1 chore: Fix clippy lint 2023-07-23 09:13:01 +02:00
sleepycatcoding e59dd9a8ef web, tests: fix connect_socket stubs 2023-07-23 09:13:01 +02:00
sleepycatcoding 41a63e3bef desktop: make socket connections async
This also fixes an unrelated bug where null bytes were added to data, this
broke data parsing.
2023-07-23 09:13:01 +02:00
sleepycatcoding 5080c19d11 core: Make socket connection async
Changes socket system to use asynchronous means to not generate lagspikes
when connecting to servers.
2023-07-23 09:13:01 +02:00
sleepycatcoding 67aa0fcbd4 tests: Stub connect_socket() 2023-07-23 09:13:01 +02:00
sleepycatcoding ff1a9bb083 web: Stub connect_socket() 2023-07-23 09:13:01 +02:00
sleepycatcoding 8f6aab56e0 desktop: correct TcpStream reading
This was incorrect as this pr was initially based on #8188.
Old code was searching for XML payload end null bytes, now it just reads
and appends bytes.
2023-07-23 09:13:01 +02:00
sleepycatcoding 2da61bc57f avm2: Some nits
Use ProgressEvent for socketData event instead of a bare event.
Remove unwraps and use correct errors/exceptions.
Correct name in make_error_2008 call.
Use expect() for getting ByteArray instead of an error.
Correct some get_*() calls
2023-07-23 09:13:01 +02:00
sleepycatcoding fc06dcbed6 avm2: Add SecurityError to globals 2023-07-23 09:13:01 +02:00
sleepycatcoding f64ca6aa85 avm2: Use ParametersExt 2023-07-23 09:13:01 +02:00
sleepycatcoding 6da0dbc287 avm2: Implement close() 2023-07-23 09:13:01 +02:00
sleepycatcoding dea9797891 avm2: Implement many primitive write methods 2023-07-23 09:13:01 +02:00
sleepycatcoding 238bc6784c avm2: Implement many primitive read methods 2023-07-23 09:13:01 +02:00
sleepycatcoding bca70dd102 core: Add read bytes to read buffer 2023-07-23 09:13:01 +02:00
sleepycatcoding 2dcc3e7930 avm2: Add read_buffer and implement bytesAvailable 2023-07-23 09:13:01 +02:00
sleepycatcoding 487d881793 avm2: Implement flush() 2023-07-23 09:13:01 +02:00
sleepycatcoding 3dfb6e3bb1 avm2: Implement writeByte and writeBytes 2023-07-23 09:13:01 +02:00
sleepycatcoding 60de72fc3e avm2: Implement endian() methods 2023-07-23 09:13:01 +02:00
sleepycatcoding d6f6d432fa avm2: Implement connect and connected 2023-07-23 09:13:01 +02:00
sleepycatcoding c22f97445a avm2: Add SocketObject 2023-07-23 09:13:01 +02:00
sleepycatcoding 8c221653ff desktop: Implement connect_socket 2023-07-23 09:13:01 +02:00
sleepycatcoding ad72c56cb4 core: Implement socket backend 2023-07-23 09:13:01 +02:00
Nathan Adams 4219f39668 avm2: Throw proper error when setting name of timeline objects 2023-07-23 01:18:53 +02:00
Aaron Hill 5ee6218ab4 avm2: Fix `super_vtable` in `describeType`
This more closely matches what avmplus does.
2023-07-22 17:50:10 -04:00
Nathan Adams e610c9a9ce web: Readd warnOnUnsupportedContent for backwards compatibility, but mark it deprecated and unused 2023-07-22 23:08:42 +02:00
Nathan Adams 586c3bebf6 core: Remove unsupported content warning 2023-07-22 23:08:42 +02:00