[ENet-discuss] ENet and PHP's socket library
GhostManZero
ghostmanzero at lutherlink.de
Thu Sep 27 00:49:38 PDT 2007
That's what i'd do, but its supposed to connect to a game server which
uses ENet, and that would mean i'd have to implement another server on
a different port to get the statistics, and we can all guess how bad
it'd be, lag-wise.
Besides, we all know ENet has reliable packets anyhow!
Quoting Bjørn Lindeijer <bjorn at lindeijer.nl>:
> Looking back at what you're trying to achieve, I'd have to ask why do
> you want to use ENet just to query some statistics? Since this needs
> sequenced and reliable communication anyway, the easiest thing to do in
> my opinion is to use a basic TCP socket separate from the socket(s)
> driven by the ENet protocol.
>
> Bjørn
>
> GhostManZero wrote:
>> That was what i feared the most, i wonder if i'll be able to do some
>> bindings for ENet then, considering how i've never written any
>> bindings for any languages before...
>>
>> Also, my main language is C++.
>>
>> Quoting Giuseppe Greco <giuseppe.greco at agamura.com>:
>>
>>> To connect to an ENet server you need an ENet client since both peers
>>> must implement the same protocol (or if you prefer "talk the same
>>> language"). You cannot just use a raw socket and expect it is able to
>>> communicate with an ENet server. Of course, ENet provides also a simple
>>> socket API (enet_socket_...) but it just hides the differences between
>>> the Socket API on Windows and the Socket API on UNIX.
>>>
>>> What you can do is to write PHP bindings for ENet (I don't know if
>>> they already exist - I use to program in C, period).
>>>
>>> j3d.
>>>
>>>>
>>>> Hello everyone,
>>>>
>>>> I would like to know if it would be possible to use PHP's socket
>>>> library to connect to a ENet server and be able to send and receive
>>>> messages, as i'd like to try to do a simple PHP script where my script
>>>> connects to a ENet Game Server and fetches the total ammount of
>>>> players online.
>>>>
>>>> Would such thing be possible under PHP? If so, would anyone mind
>>>> telling me a bit of how i should proceed?
>>>>
>>>> I'm not a PHP newbie, so if you just point me out to the functions
>>>> i must use, and in what way, i can take care of it myself.
>>>>
>>>> Thank you for your time!
>>>> --
>>>> ~Zero
>
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>
--
~Zero
More information about the ENet-discuss
mailing list