AS3 Socket - Possible to "force" port on client - "Solved"
hi everyone,
i'm working on network based air project (cs6 on win7 air 2.5, due targeting linux).
i've got python based server application waits clients on 127.0.0.1 , port 2401.
i'm going have several air based clients should able connect server.
the server supplies them short strings invoke different actions on different clients. server differentiate between clients want use "forced" port port of client, example:
air client 1 should have following local specification: ip: 127.0.0.1 port 2402, air client 2 ip: 127.0.0.1, port 2403, , on.
i setup client connector this:
// function connect server | ||||
public function fnc_connecttoserver(){ | ||||
try{ | ||||
client.connect(serverip, serverport); | ||||
} | ||||
catch (e:argumenterror){ | ||||
trace("could not connect to: " + serverip + " @ port: " + serverport); | ||||
} | ||||
// add eventlistener connect , recieved data | ||||
client.addeventlistener(event.connect, fnc_connectedtoserver); | ||||
} |
in short, connects server, server see's incoming connection client on port, lets 5634 example. when want send client 2, can't because...the client on port, server knows.
is possible force port socket client in as3?
thank lot.
// edit: seems there no possibility that. moved on using udp (datagramsocket) solution cause applications work in closed lan environment.
// so, case closed! anyway.
More discussions in ActionScript 3
adobe
Comments
Post a Comment