Python socket Module
This page shows the popular functions and classes defined in the
socket module.
The items are ordered by their popularity in 40,000 open source Python projects.
If you can not find a good example below, you can try
the search function
to search modules.
-
1. socket()Used in 2560 projects
-
2. SOCK_STREAMUsed in 1915 projects
-
3. error()Used in 1516 projects
-
Used in 923 projects
-
5. timeout()Used in 888 projects
-
6. SOCK_DGRAMUsed in 877 projects
-
7. SOL_SOCKETUsed in 859 projects
-
Used in 839 projects
-
9. AF_INETUsed in 692 projects
-
10. SO_REUSEADDRUsed in 626 projects
-
11. gaierror()Used in 554 projects
-
12. inet_aton()Used in 521 projects
-
13. getaddrinfo()Used in 482 projects
-
14. inet_ntoa()Used in 430 projects
-
Used in 392 projects
-
16. AF_INET6Used in 371 projects
-
17. IPPROTO_TCPUsed in 357 projects
-
Used in 353 projects
-
19. SHUT_RDWRUsed in 292 projects
-
20. TCP_NODELAYUsed in 291 projects
-
21. inet_pton()Used in 239 projects
-
22. getfqdn()Used in 230 projects
-
23. AF_UNSPECUsed in 212 projects
-
24. SO_KEEPALIVEUsed in 212 projects
-
Used in 180 projects
-
Used in 180 projects
-
27. gethostbyaddr()Used in 164 projects
-
28. _fileobject()Used in 157 projects
-
29. has_ipv6()Used in 154 projects
-
30. AF_UNIXUsed in 153 projects
-
31. inet_ntop()Used in 148 projects
-
32. py()Used in 132 projects
-
33. SOCK_RAWUsed in 128 projects
-
Used in 118 projects
-
35. IPPROTO_IPUsed in 113 projects
-
36. IPPROTO_UDPUsed in 112 projects
-
37. SO_BROADCASTUsed in 103 projects
-
38. AI_PASSIVEUsed in 99 projects
-
39. SHUT_WRUsed in 90 projects
-
40. SocketIO()Used in 85 projects
-
41. socketpair()Used in 84 projects
-
42. SOL_TCPUsed in 84 projects
-
43. herror()Used in 83 projects
-
44. SO_REUSEPORTUsed in 77 projects
-
45. close()Used in 70 projects
-
46. fromfd()Used in 69 projects
-
47. SO_ERRORUsed in 68 projects
-
48. IPPROTO_IPV6Used in 65 projects
-
49. htons()Used in 62 projects
-
50. ntohs()Used in 57 projects
-
51. IP_MULTICAST_TTLUsed in 54 projects
-
Used in 53 projects
-
53. recv()Used in 52 projects
-
54. TCP_KEEPIDLEUsed in 51 projects
-
55. ntohl()Used in 49 projects
-
56. send()Used in 48 projects
-
57. h()Used in 47 projects
-
58. getservbyname()Used in 46 projects
-
59. SO_RCVBUFUsed in 46 projects
-
60. settimeout()Used in 44 projects
-
61. IPV6_V6ONLYUsed in 43 projects
-
62. TCP_KEEPCNTUsed in 43 projects
-
63. TCP_KEEPINTVLUsed in 43 projects
-
64. MSG_PEEKUsed in 42 projects
-
65. htonl()Used in 41 projects
-
66. getprotobyname()Used in 41 projects
-
67. SO_SNDBUFUsed in 40 projects
-
68. INADDR_ANYUsed in 39 projects
-
69. AI_NUMERICHOSTUsed in 39 projects
-
70. SOL_IPUsed in 38 projects
-
71. AI_ADDRCONFIGUsed in 36 projects
-
72. ssl()Used in 34 projects
-
73. accept()Used in 32 projects
-
74. connect()Used in 32 projects
-
75. IPPROTO_ICMPUsed in 32 projects
-
76. getservbyport()Used in 31 projects
-
77. html()Used in 30 projects
-
78. SHUT_RDUsed in 28 projects
-
79. SO_LINGERUsed in 28 projects
-
80. listen()Used in 26 projects
-
81. getnameinfo()Used in 26 projects
-
82. IP_HDRINCLUsed in 26 projects
-
Used in 25 projects
-
84. SOL_UDPUsed in 23 projects
-
85. EAI_NONAMEUsed in 22 projects
-
86. IPPROTO_RAWUsed in 21 projects
-
87. AF_PACKETUsed in 21 projects
-
88. set_proxy()Used in 21 projects
-
Used in 20 projects
-
90. _socketobject()Used in 19 projects
-
91. SO_TYPEUsed in 19 projects
-
92. IP_MULTICAST_IFUsed in 19 projects
-
93. makefile()Used in 18 projects
-
94. AI_NUMERICSERVUsed in 18 projects
-
95. sendall()Used in 17 projects
-
96. AI_CANONNAMEUsed in 17 projects
-
97. BTPROTO_HCIUsed in 17 projects
-
98. MSG_WAITALLUsed in 17 projects
-
99. SOCK_SEQPACKETUsed in 17 projects
-
100. SIO_KEEPALIVE_VALSUsed in 15 projects
-
101. SOMAXCONNUsed in 14 projects
-
102. AddressFamily()Used in 14 projects
-
103. BTPROTO_L2CAPUsed in 13 projects
-
104. SOL_HCIUsed in 13 projects
-
105. MSG_DONTWAITUsed in 13 projects
-
106. NI_NUMERICHOSTUsed in 13 projects
-
107. sendto()Used in 13 projects
-
108. HCI_FILTERUsed in 13 projects
-
109. bind()Used in 12 projects
-
110. NI_NUMERICSERVUsed in 12 projects
-
111. IPV6_JOIN_GROUPUsed in 12 projects
-
112. MSG_OOBUsed in 11 projects
-
113. PACKET_OUTGOINGUsed in 11 projects
-
114. sslerror()Used in 10 projects
-
115. SOCK_RDMUsed in 10 projects
-
116. write()Used in 10 projects
-
117. EAI_SERVICEUsed in 10 projects
-
118. NI_NAMEREQDUsed in 10 projects
-
119. SO_OOBINLINEUsed in 10 projects
-
120. AI_V4MAPPEDUsed in 10 projects
-
121. NI_DGRAMUsed in 10 projects
-
122. SIO_RCVALLUsed in 10 projects
-
123. gettimeout()Used in 10 projects
-
124. HCI_DATA_DIRUsed in 10 projects
-
125. HCI_TIME_STAMPUsed in 10 projects
-
126. IPPROTO_GREUsed in 10 projects
-
127. if_nametoindex()Used in 10 projects
-
128. IP_DROP_MEMBERSHIPUsed in 9 projects
-
129. EAI_ADDRFAMILYUsed in 9 projects
-
130. IPV6_MULTICAST_HOPSUsed in 9 projects
-
131. RCVALL_ONUsed in 9 projects
-
132. _delegate_methods()Used in 9 projects
-
133. EBADFUsed in 8 projects
-
134. SocketType()Used in 8 projects
-
135. SCM_RIGHTSUsed in 8 projects
-
136. errors()Used in 8 projects
-
137. RCVALL_OFFUsed in 8 projects
-
138. TIPC_ADDR_NAMESEQUsed in 7 projects
-
139. TIPC_ADDR_NAMEUsed in 7 projects
-
140. IPPROTO_ESPUsed in 7 projects
-
141. if_nameindex()Used in 7 projects
-
142. AF_LINKUsed in 7 projects
-
143. TCP_MAXSEGUsed in 7 projects
-
144. AddressType()Used in 7 projects
-
145. CMSG_LENUsed in 7 projects
-
146. CMSG_SPACEUsed in 7 projects
-
147. IPV6_MULTICAST_LOOPUsed in 7 projects
-
148. fileno()Used in 7 projects
-
149. inetntoa()Used in 7 projects
-
150. IPV6_MULTICAST_IFUsed in 7 projects
-
151. getpeername()Used in 6 projects
-
152. errorTab()Used in 6 projects
-
153. IPPROTO_AHUsed in 6 projects
-
154. IPPROTO_IPIPUsed in 6 projects
-
155. SO_RCVTIMEOUsed in 6 projects
-
156. sock()Used in 6 projects
-
157. SO_PEERCREDUsed in 6 projects
-
158. SO_BINDTODEVICEUsed in 6 projects
-
159. MSG_TRUNCUsed in 6 projects
-
160. IPPROTO_SCTPUsed in 6 projects
-
161. MSG_CTRUNCUsed in 6 projects
-
162. IP_TTLUsed in 6 projects
-
163. getsockname()Used in 5 projects
-
164. recvfrom()Used in 5 projects
-
165. CAN_RAWUsed in 5 projects
-
166. fromshare()Used in 5 projects
-
167. PF_CANUsed in 5 projects
-
168. SOL_CAN_RAWUsed in 5 projects
-
169. AF_BLUETOOTHUsed in 5 projects
-
170. IPPROTO_ICMPV6Used in 5 projects