CodeOnBy - In Between Bytes
  • Home
  • Programming
    • JavaScript
    • Python
  • System
    • Cross-platform
    • Linux
    • macOS
    • Windows
  • Gear
  • About Me
Home
Programming
    JavaScript
    Python
System
    Cross-platform
    Linux
    macOS
    Windows
Gear
About Me
CodeOnBy - In Between Bytes
  • Home
  • Programming
    • JavaScript
    • Python
  • System
    • Cross-platform
    • Linux
    • macOS
    • Windows
  • Gear
  • About Me
Browsing Tag
socket
Cross-platform Linux macOS Programming Python System Windows

Python Chat Server (3 of 7)

December 13, 2019 No Comments

[ Part 1 (Overview) – Part 2 – Part 3 – Part 4 – Part 5 – Part 6 – Part 7 ]

Welcome to my blog’s first tutorial series!

Check out the video for details on the code!

What’s going on guys? Are ready to keep on coding?

In this part we won’t write too much code, mostly we’re going to focus on the building blocks to setup our server thread in the future.

This includes setting up a few variables, some new functions and some overall analysis into how the server thread is going to work.

I already explained in the overview how the program is going to operate in regards to handling clients but now we’re actually going under the hood.

Without further ado, let’s code!

Dive Into The Code

On the server script, we’re going to add two new functions:

  • CheckAddr(port, verbose)
  • AllocAddress()

The purpose of these functions will become clear later on, but for the time being we are going to use them to check if the IP address we chose as a host is available; while the second function will work to find an available port for the client to connect back to us (in the client thread, which will be developed later on).

Continue reading
Reading time: 4 min
Share:
Written by: codeboss
Page 2 of 2«12

Recent Posts

  • Python for Data Recovery
  • Data Recovery using Hex Editor
  • File Transfer in Python 3
  • Intro to SQL Injection (Lab #1)
  • Apache, MySQL & PHP Setup (Win/Linux) for SQL Injection Labs

Recent Comments

  • Brian on Brute-Force VeraCrypt Encryption
  • zhiftyDK on ARP Spoofing with Scapy
  • Alex on Python for Data Recovery
  • john on Data Recovery using Hex Editor
  • Someone1611 on Bind Shell in Python 3

About me

My name is Felipe! I’m a programmer from NY.

Blogs about coding, operating systems, network and security.

Hosting

© 2020 Copyright CodeOnBy // All rights reserved
In Between Bytes