Ticket #1724 (assigned patch)

Opened 11 years ago

Last modified 10 years ago

Add getprotobyname to Socket PMCs

Reported by: ocharles Owned by: nwellnhof
Priority: normal Milestone:
Component: core Version: 2.6.0
Severity: medium Keywords: sockets
Cc: Language:
Patch status: new Platform:


I couldn't see any implementation of getprotobyname which seems like a standard function that should be available. This adds it to Socket PMCs.

I'm not entirely sure this is the correct approach - because normally you'd call this before creating a socket object. For PIR this is OK, but in something like Perl 6 this will create a Socket object to call getprotobyname, then destroy it, then probably create another one straight after.

Anyway, this is the best I could come up with given my extremely limited knowledge of Parrot - please advise!


getprotobyname.patch Download (4.9 KB) - added by ocharles 11 years ago.
Adds getprotobyname to Socket
getprotobyname-dynop.patch Download (5.5 KB) - added by ocharles 11 years ago.

Change History

Changed 11 years ago by ocharles

Adds getprotobyname to Socket

Changed 11 years ago by ocharles

Changed 11 years ago by ocharles

Attached is a version of getprotobyname using the "socket_ops" dynop library - I think this is considerably better than adding it the PMC

Changed 11 years ago by bacek


Second patch it really good. We just need someone on Win32 to complete it.

-- Bacek.

Changed 11 years ago by nwellnhof

  • owner set to nwellnhof
  • status changed from new to assigned

Changed 10 years ago by nwellnhof

It looks like the new file src/dynoplibs/socket.ops is missing from the second patch. But I think the first approach is also OK.

Note: See TracTickets for help on using tickets.