-
-
Save kristoff-it/3465cb69ca5f2b277dc6efdb5c382aab to your computer and use it in GitHub Desktop.
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
const sockfd = try os.socket(os.AF_INET, os.SOCK_STREAM, 0); | |
var sock_addr = os.sockaddr{ | |
.in = os.sockaddr_in{ | |
.len = 0, | |
.family = os.AF_INET, | |
.port = std.mem.nativeToBig(u16, 6379), | |
.addr = try std.net.parseIp4("127.0.0.1"), | |
.zero = [_]u8{0} ** 8, | |
}, | |
}; | |
try os.connect(sockfd, &sock_addr, @sizeOf(os.sockaddr)); | |
var sock = std.fs.File.openHandle(sockfd); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment