


def 	_UpperCamelCase							(				lowercase__ = "mytext.txt" ,	lowercase__ = False				):
						import socket

						__SCREAMING_SNAKE_CASE						:					str		      =		12312  # Reserve a port for your service.
						__SCREAMING_SNAKE_CASE						:					str		      =		socket.socket()  # Create a socket object
						__SCREAMING_SNAKE_CASE						:					int		      =		socket.gethostname()  # Get local machine name
						sock.bind((host, port)				)  # Bind to the port
						sock.listen(5				)  # Now wait for client connection.

						print('''Server listening....'''				)

						while True:
												__SCREAMING_SNAKE_CASE						:					Union[str, Any]		      =		sock.accept()  # Establish connection with client.
												print(F'''Got connection from {addr}'''				)
												__SCREAMING_SNAKE_CASE						:					Optional[int]		      =		conn.recv(1024				)
												print(F'''Server received: {data = }'''				)

												with open(_a ,	'''rb'''				) as in_file:
																		__SCREAMING_SNAKE_CASE						:					Optional[int]		      =		in_file.read(1024				)
																		while data:
																								conn.send(_a				)
																								print(F'''Sent {data!r}'''				)
																								__SCREAMING_SNAKE_CASE						:					Tuple		      =		in_file.read(1024				)

												print('''Done sending'''				)
												conn.close()
												if testing:  # Allow the test to complete
																		break

						sock.shutdown(1				)
						sock.close()


if __name__ == "__main__":
						send_file()




from __future__ import annotations


def 	_UpperCamelCase							(				lowercase__				):
						__SCREAMING_SNAKE_CASE						:					List[Any]		      =		sorted(lowercase__				)
						__SCREAMING_SNAKE_CASE						:					str		      =		len(lowercase__				)
						__SCREAMING_SNAKE_CASE						:					Union[str, Any]		      =		length >> 1
						return (
						    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
						    if length % 2 == 0
						    else sorted_list[mid_index]
						)


def 	_UpperCamelCase							(				):
						import doctest

						doctest.testmod()


if __name__ == "__main__":
						main()
