Network - Gachon-Graduation-work/Muzzle_Detection_Project GitHub Wiki

Connect with Client- Socket setting

This is a connection operation for socket communication with the clients - Muzzle Detection Application.

At this time, communication between the Server and Client proceeds after the imaged is converted into byte.


Server receive

From Muzzle Detection Application, photo taken by user is sent to Server.

Server send

To Muzzle Detection Application, the final analysis completed photo will be sent to the Client.


Step 1. Define a Server Socket with your Port Number

address = ("(IP ADDRESS HERE)", (PORT NUMBER HERE))

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.bind(address)

Step 2. Enables to receive Client connection requests.

s.listen(1)

Step 3. Communicate with Client.

image

  • Every Communication proceeds after being converted into bytes.