avm2: Set timeout in AS3 constructor
This commit is contained in:
parent
568d8dfe11
commit
5144162e68
|
@ -11,6 +11,7 @@ package flash.net {
|
|||
public class Socket extends EventDispatcher implements IDataOutput, IDataInput {
|
||||
|
||||
public function Socket(host:String = null, port:int = 0) {
|
||||
this.timeout = 20000;
|
||||
if (host != null) {
|
||||
this.connect(host, port);
|
||||
}
|
||||
|
|
|
@ -24,8 +24,7 @@ pub fn socket_allocator<'gc>(
|
|||
// Default endianness is Big.
|
||||
endian: Cell::new(Endian::Big),
|
||||
object_encoding: Cell::new(ObjectEncoding::Amf3),
|
||||
// Default is 20_000 milliseconds or 20 seconds.
|
||||
timeout: Cell::new(20000),
|
||||
timeout: Cell::new(0),
|
||||
handle: Cell::new(None),
|
||||
read_buffer: RefCell::new(vec![]),
|
||||
write_buffer: RefCell::new(vec![]),
|
||||
|
|
Loading…
Reference in New Issue