Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
d2163d13
Commit
d2163d13
authored
Dec 09, 2017
by
Takeshi Watanabe
Committed by
Yukihiro "Matz" Matsumoto
Dec 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declare super class in socket.rb.
parent
949bf6ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
mrbgems/mruby-socket/mrblib/socket.rb
mrbgems/mruby-socket/mrblib/socket.rb
+6
-6
No files found.
mrbgems/mruby-socket/mrblib/socket.rb
View file @
d2163d13
...
...
@@ -165,7 +165,7 @@ class Addrinfo
end
end
class
BasicSocket
class
BasicSocket
<
IO
@@do_not_reverse_lookup
=
true
def
self
.
do_not_reverse_lookup
...
...
@@ -208,7 +208,7 @@ class BasicSocket
attr_accessor
:do_not_reverse_lookup
end
class
IPSocket
class
IPSocket
<
BasicSocket
def
self
.
getaddress
(
host
)
Addrinfo
.
ip
(
host
).
ip_address
end
...
...
@@ -227,7 +227,7 @@ class IPSocket
end
end
class
TCPSocket
class
TCPSocket
<
IPSocket
def
initialize
(
host
,
service
,
local_host
=
nil
,
local_service
=
nil
)
if
@init_with_fd
super
(
host
,
service
)
...
...
@@ -264,7 +264,7 @@ class TCPSocket
#def self.gethostbyname(host)
end
class
TCPServer
class
TCPServer
<
TCPSocket
def
initialize
(
host
=
nil
,
service
)
ai
=
Addrinfo
.
getaddrinfo
(
host
,
service
,
nil
,
nil
,
nil
,
Socket
::
AI_PASSIVE
)[
0
]
@init_with_fd
=
true
...
...
@@ -306,7 +306,7 @@ class TCPServer
end
end
class
UDPSocket
class
UDPSocket
<
IPSocket
def
initialize
(
af
=
Socket
::
AF_INET
)
super
(
Socket
.
_socket
(
af
,
Socket
::
SOCK_DGRAM
,
0
),
"r+"
)
@af
=
af
...
...
@@ -350,7 +350,7 @@ class UDPSocket
end
end
class
Socket
class
Socket
<
BasicSocket
def
initialize
(
domain
,
type
,
protocol
=
0
)
super
(
Socket
.
_socket
(
domain
,
type
,
protocol
),
"r+"
)
end
...
...
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