tests: Add socket_connect test
This commit is contained in:
parent
809e511656
commit
d52f2a4409
|
@ -0,0 +1,24 @@
|
|||
package
|
||||
{
|
||||
import flash.display.Sprite;
|
||||
|
||||
public class Test extends Sprite
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
import flash.events.Event;
|
||||
import flash.net.Socket;
|
||||
|
||||
var socket:Socket = new Socket();
|
||||
|
||||
socket.addEventListener(Event.CONNECT, function(event:Event):void
|
||||
{
|
||||
trace("connected");
|
||||
socket.writeUTF("Hello!");
|
||||
socket.flush();
|
||||
socket.close();
|
||||
});
|
||||
|
||||
socket.connect("localhost", 8001);
|
||||
|
|
@ -0,0 +1 @@
|
|||
connected
|
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
{
|
||||
"type": "Receive",
|
||||
"expected": [
|
||||
0,
|
||||
6,
|
||||
72,
|
||||
101,
|
||||
108,
|
||||
108,
|
||||
111,
|
||||
33
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "WaitForDisconnect"
|
||||
}
|
||||
]
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
num_ticks = 10
|
Loading…
Reference in New Issue