How does Flash and socket connections work on the web?

主宰稳场 提交于 2019-12-24 08:06:08

问题


I am trying to debug a socket connection issue between flash in a web browser and flash in a client type program. The connection is closing properly in the web, so I would like to understand how the web side of things work.

Right now I can load up a remote flash file in a web browser and that triggers a connection ESTABLISHED stat when viewing with netstats -fn. When I close the dialog which runs some javascript to remove the flash from the dom, the connection stats goes to TIME_WAIT.

Does the act of removing the flash from the html DOM sever the flash connection which triggers a TIME_WAIT state? How does that process work?


回答1:


If you're using flash.net.Socket, observe the behavior of calling socket.close() manually. It's up to the Flash runtime (as it's a fully binary plugin separate from the browser) how to close sockets.

The TIME_WAIT state is part of your computer's networking stack. When you actively close a socket, it goes into the TIME_WAIT state.

TIME-WAIT - represents waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.



来源:https://stackoverflow.com/questions/7677680/how-does-flash-and-socket-connections-work-on-the-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!