Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5510dc23
Kaydet (Commit)
5510dc23
authored
Mar 06, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
socket.py
üst
50d5e8a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
socket.py
Mac/Unsupported/mactcp/socket.py
+8
-8
No files found.
Mac/Unsupported/mactcp/socket.py
Dosyayı görüntüle @
5510dc23
...
...
@@ -27,7 +27,7 @@ AF_INET = 1
# Internal constants
_BUFSIZE
=
4096
# Size of TCP/UDP input buffer
_BUFSIZE
=
15
*
1024
# Size of TCP/UDP input buffer
_myaddress
=
None
_myname
=
None
...
...
@@ -74,21 +74,21 @@ def _gethostaddress():
def
socket
(
family
,
type
,
*
which
):
if
family
<>
AF_INET
:
raise
my_
error
,
'Protocol family
%
d not supported'
%
type
raise
_my
error
,
'Protocol family
%
d not supported'
%
type
if
type
==
SOCK_DGRAM
:
return
_udpsocket
()
elif
type
==
SOCK_STREAM
:
return
_tcpsocket
()
raise
my_
error
,
'Protocol type
%
d not supported'
%
type
raise
_my
error
,
'Protocol type
%
d not supported'
%
type
def
fromfd
(
*
args
):
raise
my_
error
,
'Operation not supported on a mac'
raise
_my
error
,
'Operation not supported on a mac'
class
_socket
:
def
unsupported
(
self
,
*
args
):
raise
my_
error
,
'Operation not supported on this socket'
raise
_my
error
,
'Operation not supported on this socket'
accept
=
unsupported
bind
=
unsupported
...
...
@@ -121,7 +121,7 @@ class _tcpsocket(_socket):
def
accept
(
self
):
if
not
self
.
listening
:
raise
my_
error
,
'Not listening'
raise
_my
error
,
'Not listening'
self
.
listening
=
0
self
.
stream
.
wait
()
self
.
accepted
=
1
...
...
@@ -169,7 +169,7 @@ class _tcpsocket(_socket):
def
recv
(
self
,
bufsize
,
flags
=
0
):
if
flags
:
raise
my_
error
,
'recv flags not yet supported on mac'
raise
_my
error
,
'recv flags not yet supported on mac'
if
not
self
.
databuf
:
try
:
self
.
databuf
,
urg
,
mark
=
self
.
stream
.
Rcv
(
0
)
...
...
@@ -207,7 +207,7 @@ class _udpsocket(_socket):
class
_socketfile
:
def
__init__
(
self
,
sock
,
rw
):
if
rw
not
in
(
'r'
,
'w'
):
raise
ValueE
rror
,
"mode must be 'r' or 'w'"
if
rw
not
in
(
'r'
,
'w'
):
raise
_mye
rror
,
"mode must be 'r' or 'w'"
self
.
sock
=
sock
self
.
rw
=
rw
self
.
buf
=
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment