![]() |
|
[Python] Socket Chat Bug - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Socket Chat Bug (/showthread.php?tid=5820123) |
Socket Chat Bug - F.A.S.T - Apr 3, 2018 I have created this Simple CHAT System using Socket Module, But When the message is sent, It doesn't really appear unless ENTER is pressed. Can anyone tell me what I'm missing or anything that could fix this Bug? Here is the Code : SERVER : Spoiler (Click to View) CLIENT : Spoiler (Click to View) RE: Socket Chat Bug - Chercher - Apr 8, 2018 Code def autoRECV():perhaps you mean to break out of the loop, else the MSGSender function won't ever be reached. RE: Socket Chat Bug - lamadamadoo - Apr 15, 2018 Your whole code is being held up by the input() function. After you press enter it skips the function only to get stuck at that same function again. If you want to do this I suggest making a new thread for your input command. RE: Socket Chat Bug - Goodies - Apr 16, 2018 I'm all for using this as a learning tool, but the socket module should not be used in any legitimate applications other than constants or setsockopt or something like that. There's no reason to manually deal with sockets with so many amazing applications provide a safe, higher level API. |