import socket
socket_1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket_1.connect(("localhost", 5555)) # Address tuple
socket_1.send(bytes("hello world", encoding="UTF-8"))
import socket
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind(('localhost', 5555))
serversocket.listen()
(socket_2, address) = serversocket.accept()
b = socket_2.recv(30)
print(str(b))
b'hello world'
". The "b" indicates binary data as that's how the client sent it.
http://www.w3.org:80/People/Berners-Lee/Overview.html
http
).
www.w3.org
/People/Berners-Lee/Overview.html
80
.
<HTML>
<HEAD>
<TITLE>Title for top of browser</TITLE>
</HEAD>
<BODY>
<!--Stuff goes here; this is a comment-->
</BODY>
</HTML>
<BODY>
The break tag breaks a line<BR />
like that.
<P>
The paragraph tags
</P>
leave a line.
This is <B>Bold</B>.
This is <I>Italic</I>.
<IMG src="tim.gif" alt="Photo: Pic of Tim" width="50" height="50"></IMG>
<A href="index.html">Link text</A>
</BODY>
<TABLE>
<TR><TH>y</TH><TH>x</TH><TH>z</TH></TR>
<TR><TD>2</TD><TD>5</TD><TD>3</TD></TR>
<TR><TD>4</TD><TD>3</TD><TD>0</TD></TR>
<TR><TD>3</TD><TD>1</TD><TD>5</TD></TR>
</TABLE>
y | x | z |
---|---|---|
2 | 5 | 3 |
4 | 3 | 0 |
3 | 1 | 5 |
|
<TABLE class="datatable" id="yxz">
<TR><TD class='y'>73</TD></TR>
<link rel="stylesheet" href="http://www.geog.leeds.ac.uk/courses/computing/css/doublePage.css">
<link rel="stylesheet" href="doublePage.css">
/* All tables */
TABLE {
border: 1px solid black;
}
/* All tables of class datatable */
TABLE.datatable {
margin: 10px;
}
/* Tables of ID yxz */
TABLE#yxz {
background-color: white;
}
/* TD in Tables of ID yxz */
TABLE#yxz td {
padding: 10px;
}