Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for sockaddrToIP (0.1 sec)

  1. src/net/iprawsock_posix.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build unix || js || wasip1 || windows
    
    package net
    
    import (
    	"context"
    	"syscall"
    )
    
    func sockaddrToIP(sa syscall.Sockaddr) Addr {
    	switch sa := sa.(type) {
    	case *syscall.SockaddrInet4:
    		return &IPAddr{IP: sa.Addr[0:]}
    	case *syscall.SockaddrInet6:
    		return &IPAddr{IP: sa.Addr[0:], Zone: zoneCache.name(int(sa.ZoneId))}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top