문제

Do servers like SmartFox or Player.io use sockets at the core to connect to clients lets say with Flash as3 ??

도움이 되었습니까?

해결책

All communication on networks use "sockets." The IP (internet protocol) in TCP (transmission control protocol) /IP dictates this (family guy). For a message to be sent requires an IP address and a port (for both the source and destination), beyond that it needs some memory space to buffer the data as it comes in. This is basically what any "Socket" class provides.

The TCP part has to do with making sure data isn't lost and throttling speed to avoid overflowing buffers and re-sending messages etc.

With multiplayer games I believe UDP (user datagram protocol) is preferred still because it doesn't have the overhead of TCP, but it also isn't 100% accurate/checked, so it isn't used for HTML etc. (don't want words coming in out of order, but an action in a game coming one moment after it should have is acceptable).

Regardless of which particular protocol is used above the internet protocol there will be a socket involved. The application layer in the OSI model sits above all of this stuff that's happening and is usually programmed in something like Flash/Java/C/C++/Python/Ruby etc.

And that is everything you can learn in an introductory network programming in Java class at DePaul University (or at least everything I can muster up at the moment).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top