Hi. I’m looking through the LLAPI and I have some questions:
Why does NetworkTransport.Connect() need a hostId (the first argument)?
Do I need to call NetworkTransport.AddHost() even for a (pure) client? (Maybe this should be called CreateSocket()?!)
Why do I have to pass the BufferSize to NetworkTransport.Receive()
That’s all I can remember for now. Thanks.
- From network view you need to open udp socket to be able send and receive something to/from internet, correct? Library need to know what socket it should use when you are going to send data. AddHost() - internally will open udp socket. Connect() should point to the socket which are you going to use.
NetworkTransport.Receive() - internally have a buffer with received data, this buffer belongs to library not to you, so You need provide your buffer for data.
Thanks, I wasn’t sure what host meant (the naming is a little weird).
I have a couple more questions:
How does ConnectAsNetworkHost() works and what is the correct way to use it?
How to use this ReceiveFromHost() together with ConnectAsNetworkHost()?
Should I use Receive() together with ReceiveFromHost()?
What is this ReceiveRelayEventFromHost()?
I’d also like to know how ConnectAsNetworkHost() works. I’d like if possible to use the Matchmaker and relay server with LLAPI.