-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from libp2p/feat/wasm
Support WASM
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ os: | |
|
||
language: go | ||
go: | ||
- 1.10.x | ||
- 1.11.x | ||
|
||
install: | ||
- make deps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package reuseport | ||
|
||
import ( | ||
"context" | ||
"net" | ||
) | ||
|
||
// TODO. for now, just pass it over to net.Listen/net.Dial | ||
|
||
func listen(network, address string) (net.Listener, error) { | ||
return net.Listen(network, address) | ||
} | ||
|
||
func listenPacket(netw, laddr string) (net.PacketConn, error) { | ||
return net.ListenPacket(netw, laddr) | ||
} | ||
|
||
func listenStream(netw, addr string) (net.Listener, error) { | ||
return listen(netw, addr) | ||
} | ||
|
||
func dial(ctx context.Context, dialer net.Dialer, network, address string) (net.Conn, error) { | ||
return dialer.DialContext(ctx, network, address) | ||
} | ||
|
||
func available() bool { | ||
return false | ||
} |