Author Topic: Recovery data channel  (Read 5068 times)

Noi14

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 57
    • View Profile
Recovery data channel
« on: February 20, 2014, 07:50:16 AM »
hi,
I need to set same values like data of current channel and to recovery where I want in order to update.
Now I'm able to set using:
TNManager.client.BeginSend(Packet.RequestSetChannelData).Write(json_string);
TNManager.client.EndSend();

But I don't understand how to recover date of current channel from the server

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Recovery data channel
« Reply #1 on: February 20, 2014, 01:09:18 PM »
You don't need to send that custom packet. Just modify TNManager.channelData.
  1. TNManager.channelData = "abc123";
  2. Debug.Log(TNManager.channelData);

Noi14

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 57
    • View Profile
Re: Recovery data channel
« Reply #2 on: February 20, 2014, 03:21:35 PM »
Thank you for your reply, I think I don't understrand what should the custom packet used for.
Can you tell me in which cases I have to use them?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Recovery data channel
« Reply #3 on: February 21, 2014, 11:23:49 AM »
Custom packets? You would add new packets if you wanted new functionality on the server that doesn't come with TNet, such as requesting a list of players in a specific channel without joining the channel first.

Noi14

  • Jr. Member
  • **
  • Thank You
  • -Given: 10
  • -Receive: 0
  • Posts: 57
    • View Profile
Re: Recovery data channel
« Reply #4 on: February 21, 2014, 04:46:23 PM »
Perfect Thank you :D