Jump to content
  • Advertisement

coquinounet

Member
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

161 Neutral

About coquinounet

  • Rank
    Member
  1. coquinounet

    ENet client problem

    Well i found that was my thread that don't use mutex so my function to sends packet was unreacheable
  2. coquinounet

    ENet client problem

    Well there is a lot of packet loss, but why, I don't know
  3. coquinounet

    ENet client problem

    Well when i use enet_host_service, there is no event for receiving so I can't find why I donc receive them and I can't debug it
  4. coquinounet

    ENet client problem

    When the client should receive them, but how and why, i don't know but it's on only one channel, that's weird
  5. coquinounet

    ENet client problem

    The server sends packets, client don't receive them but he stills sending packets and server receives them
  6. coquinounet

    ENet client problem

    Hello, i'm making a game with SFML and ENet for network, i've made a game server and after some seconds, the client stops receiving packets from the server but he still sending packets. I don't know if you already had this problems but if you have some hints, i thinks it's maybe because i send to much packets but it's not sure.   Thanks for reading
  7. coquinounet

    ENet packet question

    Thanks ! That works   Just in case for those who want do the same thing, to send the packet you must do that HeaderPacket thepacket = HeaderPacket(PACKET_Handshake, 5); ENetPacket *packet = enet_packet_create((const char*)&thepacket.getData()[0], thepacket.getData().size(), ENET_PACKET_FLAG_RELIABLE); enet_peer_send(event.peer, 0, packet);
  8. coquinounet

    ENet packet question

    Well i don't get it, what should i do ?
  9. coquinounet

    ENet packet question

    Well for example i have this packet struct class HeaderPacket { protected: std::vector<char> data; public: const std::vector<char> getData() { return data; } HeaderPacket(char cmd = 0, unsigned int id = 0) { data.insert(data.end(), cmd, sizeof(cmd)); data.insert(data.end(), id, sizeof(id)); } }; A simple enum with the packets types enum PacketType : char { PACKET_Handshake = 0x01, PACKET_Hello = 0x02 }; And when my client connect, I do that : HeaderPacket *thepacket = new HeaderPacket(PACKET_Handshake, 5); ENetPacket *packet = enet_packet_create(&thepacket->getData(), thepacket->getData().size(), ENET_PACKET_FLAG_RELIABLE); enet_peer_send(event.peer, 0, packet); There is probably beginner errors, sorry
  10. coquinounet

    ENet packet question

    Hello,   I'm making a little game server with ENet and I've tried to use it using packet that I made (with an header and data in body) but when I do it and I send a packet, it appears that it's never the same data which are received although I send the same packet. If you have a tutorial or examples to show me, it would be nice.   Thanks
  11. I would to know how i can do a list of all servers of my game, i thought try all ips but it will be not optimized so i ask you if there is a better way, thanks    (i use SDL_Net if you want to know)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!