mirror of
https://github.com/sbrow/zomq.git
synced 2026-08-26 10:53:32 -04:00
feat: Removed allocations from bind and connect.
This commit is contained in:
@@ -125,14 +125,12 @@ close :: proc(s: Socket) -> Error {
|
||||
return _close(s) == 0 ? nil : last_error()
|
||||
}
|
||||
|
||||
bind :: proc(s: Socket, addr: string, allocator := context.temp_allocator) -> Error {
|
||||
c := strings.clone_to_cstring(addr, allocator)
|
||||
return _bind(s, c) == 0 ? nil : last_error()
|
||||
bind :: proc(s: Socket, addr: cstring) -> Error {
|
||||
return _bind(s, addr) == 0 ? nil : last_error()
|
||||
}
|
||||
|
||||
connect :: proc(s: Socket, addr: string, allocator := context.temp_allocator) -> Error {
|
||||
c := strings.clone_to_cstring(addr, allocator)
|
||||
return _connect(s, c) == 0 ? nil : last_error()
|
||||
connect :: proc(s: Socket, addr: cstring) -> Error {
|
||||
return _connect(s, addr) == 0 ? nil : last_error()
|
||||
}
|
||||
|
||||
send :: proc {
|
||||
|
||||
Reference in New Issue
Block a user