Re: recieving client's name in socket in python

2020-07-12 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: recieving client's name in socket in python

@4We already did. We all also told you that networking is hard.

URL: https://forum.audiogames.net/post/551509/#p551509




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: recieving client's name in socket in python

2020-07-11 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


Re: recieving client's name in socket in python

i am using threads to handle request. and at my beggining of my function which i used in thread. name=s.recv(1024). so that when ever he enter his first input that will bee the clients name. so, i got the name. and i appended the conn variable  and use a for loop to send message to all the clients. so, i got the clients name and how to send pm there. please help. just give me logic

URL: https://forum.audiogames.net/post/551314/#p551314




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: recieving client's name in socket in python

2020-07-10 Thread AudioGames . net Forum — Developers room : Lucas1853 via Audiogames-reflector


  


Re: recieving client's name in socket in python

Basically, the flow will most likely go something like this:Client 1 sends a command with a message and the name of a player to send to. Example: "/pm client2 Dude, if you don't give me my stuff back I'll kill you." This is assuming private messages work in the same way as they do in most preexisting audiogames, with a slash command.Server receives that message, searches the players to find the one with the name client2. Then it sends a formatted message to the IP associated with client2. Example: "Private message from Client1: Dude, if you don't give me my stuff back I'll kill you."Client2 receives that formatted string and speaks it.How you store the mapping of player names to IP addresses is up to you and there are probably different ways to do it depending on how complex your game is. Whether it be stored in a dict or in a Player class, it doesn't really matter.

URL: https://forum.audiogames.net/post/550751/#p550751




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: recieving client's name in socket in python

2020-07-10 Thread AudioGames . net Forum — Developers room : Lucas1853 via Audiogames-reflector


  


Re: recieving client's name in socket in python

Basically, the flow will most likely go something like this:Client 1 sends a command with a message and the name of a player to send to. Example: "/pm client2 Dude, if you don't give me my stuff back I'll kill you." This is assuming private messages work in the same way as they do in most preexisting audiogames, with a slash command.Server receives that message, searches the players to find the one with the name client2. Then it sends a formatted message to the IP associated with client2. Example: "Private message from Client1: Dude, if you don't give me my stuff back I'll kill you."Client2 receives that formatted string and speaks it.

URL: https://forum.audiogames.net/post/550751/#p550751




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: recieving client's name in socket in python

2020-07-10 Thread AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector


  


Re: recieving client's name in socket in python

You can't connect two clients directly to each other without NAT hole-punching and a UDP-based protocol. PMs need to go through the chat server.  Even if you do go as far as finding something that does NAT hole-punching and a reliable UDP protocol you still can't always connect clients directly and still need a chat server that can act as a relay.

URL: https://forum.audiogames.net/post/550724/#p550724




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


recieving client's name in socket in python

2020-07-10 Thread AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector


  


recieving client's name in socket in python

hello all, i want my client to enter his name and i stored name like outside the while loop when first data recieved then it should store it as name. remaining are just i kept in while loop. so, i basicly use this while loop to chat all the clients each other who are in the room. but to send pm's in that case i use s.sendto(). but in that, the user who want to send pm must use IP of his pm member. but, is there a way to get the IP of the client with name which client specifyed?thanks in advance. and if any one dont understand my question, i am ready to tell it in deep.

URL: https://forum.audiogames.net/post/550718/#p550718




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector