Server Side

  • Nusairat J
N/ACitations
Citations of this article
12Readers
Mendeley users who have this article in their library.
Get full text

Abstract

import socket import random sender = socket.socket(socket.AF_INET,socket.SOCK_STREAM) sender.bind((socket.gethostname(),100)) sender.listen(5) print("Waiting for a connection with the receiver") while True: client, address = sender.accept() print(f"Connection to {address} established") print("_______SENDER________") file = input("Enter a file name: ") msg = open(file,'r').read() data = list(msg) # number of packets y = len(data)//5 packets = [] #list of packets\ for x in range(y+1): packets.append(data[0:5]) del data[0:5]

Cite

CITATION STYLE

APA

Nusairat, J. F. (2020). Server Side. In Rust for the IoT (pp. 33–90). Apress. https://doi.org/10.1007/978-1-4842-5860-6_2

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free