1+ <!doctype html>
2+ < html lang ="en ">
3+ < head >
4+
5+ < meta charset ="utf-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
7+
8+ < meta property ="og:title " content ="PyBox - Python Games ">
9+ < meta property ="og:type " content ="website ">
10+ < meta property ="og:description " content ="Python Games to increase your skill and experience in Python ">
11+ <!-- <meta property="og:image" content="">
12+ <meta property="og:url" content=""> -->
13+
14+ < meta name ="twitter:title " content ="PyBox - Python Games ">
15+ < meta name ="twitter:site " content ="@hhhrrrttt222111 ">
16+ < meta name ="twitter:creator " content ="@hhhrrrttt222111 ">
17+ < meta name ="twitter:description " content ="Python Games to increase your skill and experience in Python ">
18+
19+
20+ < link rel = "icon " href ="..\assets\icons\logo-png.png " type = "image/x-icon ">
21+
22+ < link href ="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css " rel ="stylesheet "
23+ integrity ="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN " crossorigin ="anonymous ">
24+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css "
25+ integrity ="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T " crossorigin ="anonymous ">
26+ < link rel ="stylesheet " href ="games.css ">
27+ < title > PyBox - </ title >
28+ </ head >
29+ < body >
30+
31+ < nav class ="navbar static-top ">
32+ < div class ="container ">
33+ < a class ="navbar-brand " href ="../index.html "> < img src ="..\assets\icons\logo-png.png " class ="nav-logo " alt ="PyBox "> </ a >
34+ < button onclick ="goBack() " class ="btn btn-dark "> Go Back</ button >
35+ </ div >
36+
37+ </ nav >
38+
39+
40+ < div class ="container ">
41+ < div class ="row ">
42+ < div class ="col-sm-4 ">
43+ < h1 class ="game-title "> Game Title</ h1 >
44+ < p class ="game-desc "> Some text about me in culpa qui officia deserunt mollit anim..</ p >
45+ < ul class ="nav nav-pills flex-column ">
46+ < li class ="nav-item ">
47+ < a class ="fa fa-2x fa-github " href ="# " target ="_blank " rel ="noopener noreferrer "> </ a >
48+ </ li >
49+ </ ul >
50+ < hr class ="d-sm-none ">
51+ </ div >
52+
53+
54+ < div class ="col-sm-8 ">
55+
56+
57+ < div class ="download ">
58+ < h4 class ="dwnld "> Download</ h4 >
59+ < a class ="btn " href ="new.txt " download > < i class ="fa fa-2x fa-file "> </ i > </ a >
60+ < a class ="btn " href ="new.txt " download > < img src ="../assets/icons/python-icon.png " alt ="python-icon " class ="python-icon "> </ i > </ a >
61+ </ div >
62+
63+
64+
65+ <!-- CODE -->
66+ < pre class ="code ">
67+
68+ < span class ="comment "> # import packages</ span >
69+ import socket
70+ import select
71+ import errno
72+ import sys
73+
74+ < span class ="variable "> HEADER_LENGTH</ span > = 10
75+ IP = "127.0.0.1"
76+ PORT = 1234
77+
78+ my_username = < span class ="in-built "> input</ span > ("Username:")
79+ client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
80+ client_socket.connect((IP, PORT))
81+ client_socket.setblocking(False)
82+
83+ username = my_username.encode('utf-8')
84+ client_socket.send(username_header + username)
85+
86+ while True:
87+ message = input(f"{my_username} > ")
88+
89+ if message:
90+ message = message.encode('utf-8')
91+ message_header = f"{len(message):< {HEADER_LENGTH}}".encode('utf-8')
92+ client_socket.send(message_header + message)
93+
94+ try:
95+ while < span class ="data-type "> True</ span > :
96+ username_header = client_socket.recv(HEADER_LENGTH)
97+ if not len(username_header):
98+ print("Connection closed by the server")
99+ sys.exit()
100+
101+ </ pre >
102+
103+ <!-- CODE -->
104+ < br >
105+
106+
107+
108+
109+
110+ < div class ="images ">
111+ < div id ="carouselExampleFade " class ="carousel slide carousel-fade " data-ride ="carousel ">
112+ < ol class ="carousel-indicators ">
113+ < li data-target ="#carouselExampleCaptions " data-slide-to ="0 " class ="active "> </ li >
114+ < li data-target ="#carouselExampleCaptions " data-slide-to ="1 "> </ li >
115+
116+ </ ol >
117+ < div class ="carousel-inner ">
118+ < div class ="carousel-item active ">
119+ < img src ="../civil6.jpg " class ="d-block w-100 " alt ="... ">
120+ </ div >
121+ < div class ="carousel-item ">
122+ < img src ="../electronics4.jpg " class ="d-block w-100 " alt ="... ">
123+ </ div >
124+ </ div >
125+ < a class ="carousel-control-prev " href ="#carouselExampleFade " role ="button " data-slide ="prev ">
126+ < span class ="carousel-control-prev-icon " aria-hidden ="true "> </ span >
127+ < span class ="sr-only "> Previous</ span >
128+ </ a >
129+ < a class ="carousel-control-next " href ="#carouselExampleFade " role ="button " data-slide ="next ">
130+ < span class ="carousel-control-next-icon " aria-hidden ="true "> </ span >
131+ < span class ="sr-only "> Next</ span >
132+ </ a >
133+ </ div >
134+ </ div >
135+
136+
137+
138+
139+ < div class ="buyme ">
140+
141+ < a href ="https://ko-fi.com/hhhrrrttt222111 " target ="_blank " rel ="noopener noreferrer "> < span class ="buy "> Buy Me A Coffee</ span > < img src ="../assets/icons/kofi.png " alt ="ko-fi " class ="coffee "> </ a >
142+ </ div >
143+
144+ </ div >
145+
146+ </ div >
147+
148+ </ div >
149+
150+
151+
152+ < div class ="footer ">
153+ < p class ="footer-heart ">
154+ Made with < g-emoji class ="g-emoji " alias ="heart " fallback-src ="https://raw.githubusercontent.com/hhhrrrttt222111/etudia/master/assets/necro.png?token=AKLVDPY75U5YNHZ7PRA4Y4K6TRB2I ">
155+ < img class ="emoji " alt ="heart " height ="20 " width ="20 " src ="https://raw.githubusercontent.com/hhhrrrttt222111/etudia/master/assets/necro.png?token=AKLVDPY75U5YNHZ7PRA4Y4K6TRB2I ">
156+ </ g-emoji > by < a href ="http://hhhrrrttt222111.me/ " target ="_blank "> HRT</ a >
157+ </ p >
158+ </ div >
159+
160+
161+
162+
163+ < script >
164+ function goBack ( ) {
165+ window . history . back ( ) ;
166+ }
167+ </ script >
168+ < script src ="https://code.jquery.com/jquery-3.3.1.slim.min.js "
169+ integrity ="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo " crossorigin ="anonymous "> </ script >
170+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js "
171+ integrity ="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1 " crossorigin ="anonymous "> </ script >
172+ < script src ="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js "
173+ integrity ="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM " crossorigin ="anonymous "> </ script >
174+ </ body >
175+ </ html >
0 commit comments