forked from zeromq/goczmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsock_option.go
1620 lines (1346 loc) · 48.9 KB
/
sock_option.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//go:generate gsl sockopts.xml
package goczmq
/* =========================================================================
zsock_option - get/set 0MQ socket options
****************************************************
* GENERATED SOURCE CODE, DO NOT EDIT!! *
* TO CHANGE THIS, EDIT sockopts.gsl *
* AND RUN gsl -q sockopts.xml *
****************************************************
Copyright (c) the Contributors as noted in the AUTHORS file.
This file is part of goczmq, the high-level go binding for CZMQ:
http://github.com/zeromq/goczmq
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
=========================================================================
*/
/*
#include "czmq.h"
#include <stdlib.h>
#include <string.h>
*/
import "C"
import (
"unsafe"
)
// SetHeartbeatIvl sets the heartbeat_ivl option for the socket
func (s *Sock) SetHeartbeatIvl(val int) {
C.zsock_set_heartbeat_ivl(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetHeartbeatIvl sets the heartbeat_ivl option for the socket
func SockSetHeartbeatIvl(v int) SockOption {
return func(s *Sock) {
C.zsock_set_heartbeat_ivl(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// HeartbeatIvl returns the current value of the socket's heartbeat_ivl option
func (s *Sock) HeartbeatIvl() int {
val := C.zsock_heartbeat_ivl(unsafe.Pointer(s.zsockT))
return int(val)
}
// HeartbeatIvl returns the current value of the socket's heartbeat_ivl option
func HeartbeatIvl(s *Sock) int {
val := C.zsock_heartbeat_ivl(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetHeartbeatTtl sets the heartbeat_ttl option for the socket
func (s *Sock) SetHeartbeatTtl(val int) {
C.zsock_set_heartbeat_ttl(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetHeartbeatTtl sets the heartbeat_ttl option for the socket
func SockSetHeartbeatTtl(v int) SockOption {
return func(s *Sock) {
C.zsock_set_heartbeat_ttl(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// HeartbeatTtl returns the current value of the socket's heartbeat_ttl option
func (s *Sock) HeartbeatTtl() int {
val := C.zsock_heartbeat_ttl(unsafe.Pointer(s.zsockT))
return int(val)
}
// HeartbeatTtl returns the current value of the socket's heartbeat_ttl option
func HeartbeatTtl(s *Sock) int {
val := C.zsock_heartbeat_ttl(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetHeartbeatTimeout sets the heartbeat_timeout option for the socket
func (s *Sock) SetHeartbeatTimeout(val int) {
C.zsock_set_heartbeat_timeout(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetHeartbeatTimeout sets the heartbeat_timeout option for the socket
func SockSetHeartbeatTimeout(v int) SockOption {
return func(s *Sock) {
C.zsock_set_heartbeat_timeout(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// HeartbeatTimeout returns the current value of the socket's heartbeat_timeout option
func (s *Sock) HeartbeatTimeout() int {
val := C.zsock_heartbeat_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// HeartbeatTimeout returns the current value of the socket's heartbeat_timeout option
func HeartbeatTimeout(s *Sock) int {
val := C.zsock_heartbeat_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetUseFd sets the use_fd option for the socket
func (s *Sock) SetUseFd(val int) {
C.zsock_set_use_fd(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetUseFd sets the use_fd option for the socket
func SockSetUseFd(v int) SockOption {
return func(s *Sock) {
C.zsock_set_use_fd(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// UseFd returns the current value of the socket's use_fd option
func (s *Sock) UseFd() int {
val := C.zsock_use_fd(unsafe.Pointer(s.zsockT))
return int(val)
}
// UseFd returns the current value of the socket's use_fd option
func UseFd(s *Sock) int {
val := C.zsock_use_fd(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetXPubManual sets the xpub_manual option for the socket
func (s *Sock) SetXPubManual(val int) {
C.zsock_set_xpub_manual(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetXPubManual sets the xpub_manual option for the socket
func SockSetXPubManual(v int) SockOption {
return func(s *Sock) {
C.zsock_set_xpub_manual(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetXPubWelcomeMsg sets the xpub_welcome_msg option for the socket
func (s *Sock) SetXPubWelcomeMsg(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_xpub_welcome_msg(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetXPubWelcomeMsg sets the xpub_welcome_msg option for the socket
func SockSetXPubWelcomeMsg(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_xpub_welcome_msg(unsafe.Pointer(s.zsockT), cV)
}
}
// SetStreamNotify sets the stream_notify option for the socket
func (s *Sock) SetStreamNotify(val int) {
C.zsock_set_stream_notify(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetStreamNotify sets the stream_notify option for the socket
func SockSetStreamNotify(v int) SockOption {
return func(s *Sock) {
C.zsock_set_stream_notify(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetInvertMatching sets the invert_matching option for the socket
func (s *Sock) SetInvertMatching(val int) {
C.zsock_set_invert_matching(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetInvertMatching sets the invert_matching option for the socket
func SockSetInvertMatching(v int) SockOption {
return func(s *Sock) {
C.zsock_set_invert_matching(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// InvertMatching returns the current value of the socket's invert_matching option
func (s *Sock) InvertMatching() int {
val := C.zsock_invert_matching(unsafe.Pointer(s.zsockT))
return int(val)
}
// InvertMatching returns the current value of the socket's invert_matching option
func InvertMatching(s *Sock) int {
val := C.zsock_invert_matching(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetXPubVerboser sets the xpub_verboser option for the socket
func (s *Sock) SetXPubVerboser(val int) {
C.zsock_set_xpub_verboser(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetXPubVerboser sets the xpub_verboser option for the socket
func SockSetXPubVerboser(v int) SockOption {
return func(s *Sock) {
C.zsock_set_xpub_verboser(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetConnectTimeout sets the connect_timeout option for the socket
func (s *Sock) SetConnectTimeout(val int) {
C.zsock_set_connect_timeout(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetConnectTimeout sets the connect_timeout option for the socket
func SockSetConnectTimeout(v int) SockOption {
return func(s *Sock) {
C.zsock_set_connect_timeout(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// ConnectTimeout returns the current value of the socket's connect_timeout option
func (s *Sock) ConnectTimeout() int {
val := C.zsock_connect_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// ConnectTimeout returns the current value of the socket's connect_timeout option
func ConnectTimeout(s *Sock) int {
val := C.zsock_connect_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetTcpMaxrt sets the tcp_maxrt option for the socket
func (s *Sock) SetTcpMaxrt(val int) {
C.zsock_set_tcp_maxrt(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetTcpMaxrt sets the tcp_maxrt option for the socket
func SockSetTcpMaxrt(v int) SockOption {
return func(s *Sock) {
C.zsock_set_tcp_maxrt(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// TcpMaxrt returns the current value of the socket's tcp_maxrt option
func (s *Sock) TcpMaxrt() int {
val := C.zsock_tcp_maxrt(unsafe.Pointer(s.zsockT))
return int(val)
}
// TcpMaxrt returns the current value of the socket's tcp_maxrt option
func TcpMaxrt(s *Sock) int {
val := C.zsock_tcp_maxrt(unsafe.Pointer(s.zsockT))
return int(val)
}
// ThreadSafe returns the current value of the socket's thread_safe option
func (s *Sock) ThreadSafe() int {
val := C.zsock_thread_safe(unsafe.Pointer(s.zsockT))
return int(val)
}
// ThreadSafe returns the current value of the socket's thread_safe option
func ThreadSafe(s *Sock) int {
val := C.zsock_thread_safe(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetMulticastMaxtpdu sets the multicast_maxtpdu option for the socket
func (s *Sock) SetMulticastMaxtpdu(val int) {
C.zsock_set_multicast_maxtpdu(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetMulticastMaxtpdu sets the multicast_maxtpdu option for the socket
func SockSetMulticastMaxtpdu(v int) SockOption {
return func(s *Sock) {
C.zsock_set_multicast_maxtpdu(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// MulticastMaxtpdu returns the current value of the socket's multicast_maxtpdu option
func (s *Sock) MulticastMaxtpdu() int {
val := C.zsock_multicast_maxtpdu(unsafe.Pointer(s.zsockT))
return int(val)
}
// MulticastMaxtpdu returns the current value of the socket's multicast_maxtpdu option
func MulticastMaxtpdu(s *Sock) int {
val := C.zsock_multicast_maxtpdu(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetVmciBufferSize sets the vmci_buffer_size option for the socket
func (s *Sock) SetVmciBufferSize(val int) {
C.zsock_set_vmci_buffer_size(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetVmciBufferSize sets the vmci_buffer_size option for the socket
func SockSetVmciBufferSize(v int) SockOption {
return func(s *Sock) {
C.zsock_set_vmci_buffer_size(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// VmciBufferSize returns the current value of the socket's vmci_buffer_size option
func (s *Sock) VmciBufferSize() int {
val := C.zsock_vmci_buffer_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// VmciBufferSize returns the current value of the socket's vmci_buffer_size option
func VmciBufferSize(s *Sock) int {
val := C.zsock_vmci_buffer_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetVmciBufferMinSize sets the vmci_buffer_min_size option for the socket
func (s *Sock) SetVmciBufferMinSize(val int) {
C.zsock_set_vmci_buffer_min_size(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetVmciBufferMinSize sets the vmci_buffer_min_size option for the socket
func SockSetVmciBufferMinSize(v int) SockOption {
return func(s *Sock) {
C.zsock_set_vmci_buffer_min_size(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// VmciBufferMinSize returns the current value of the socket's vmci_buffer_min_size option
func (s *Sock) VmciBufferMinSize() int {
val := C.zsock_vmci_buffer_min_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// VmciBufferMinSize returns the current value of the socket's vmci_buffer_min_size option
func VmciBufferMinSize(s *Sock) int {
val := C.zsock_vmci_buffer_min_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetVmciBufferMaxSize sets the vmci_buffer_max_size option for the socket
func (s *Sock) SetVmciBufferMaxSize(val int) {
C.zsock_set_vmci_buffer_max_size(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetVmciBufferMaxSize sets the vmci_buffer_max_size option for the socket
func SockSetVmciBufferMaxSize(v int) SockOption {
return func(s *Sock) {
C.zsock_set_vmci_buffer_max_size(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// VmciBufferMaxSize returns the current value of the socket's vmci_buffer_max_size option
func (s *Sock) VmciBufferMaxSize() int {
val := C.zsock_vmci_buffer_max_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// VmciBufferMaxSize returns the current value of the socket's vmci_buffer_max_size option
func VmciBufferMaxSize(s *Sock) int {
val := C.zsock_vmci_buffer_max_size(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetVmciConnectTimeout sets the vmci_connect_timeout option for the socket
func (s *Sock) SetVmciConnectTimeout(val int) {
C.zsock_set_vmci_connect_timeout(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetVmciConnectTimeout sets the vmci_connect_timeout option for the socket
func SockSetVmciConnectTimeout(v int) SockOption {
return func(s *Sock) {
C.zsock_set_vmci_connect_timeout(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// VmciConnectTimeout returns the current value of the socket's vmci_connect_timeout option
func (s *Sock) VmciConnectTimeout() int {
val := C.zsock_vmci_connect_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// VmciConnectTimeout returns the current value of the socket's vmci_connect_timeout option
func VmciConnectTimeout(s *Sock) int {
val := C.zsock_vmci_connect_timeout(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetConnectRid sets the connect_rid option for the socket
func (s *Sock) SetConnectRid(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_connect_rid(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetConnectRid sets the connect_rid option for the socket
func SockSetConnectRid(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_connect_rid(unsafe.Pointer(s.zsockT), cV)
}
}
// SetHandshakeIvl sets the handshake_ivl option for the socket
func (s *Sock) SetHandshakeIvl(val int) {
C.zsock_set_handshake_ivl(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetHandshakeIvl sets the handshake_ivl option for the socket
func SockSetHandshakeIvl(v int) SockOption {
return func(s *Sock) {
C.zsock_set_handshake_ivl(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// HandshakeIvl returns the current value of the socket's handshake_ivl option
func (s *Sock) HandshakeIvl() int {
val := C.zsock_handshake_ivl(unsafe.Pointer(s.zsockT))
return int(val)
}
// HandshakeIvl returns the current value of the socket's handshake_ivl option
func HandshakeIvl(s *Sock) int {
val := C.zsock_handshake_ivl(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetSocksProxy sets the socks_proxy option for the socket
func (s *Sock) SetSocksProxy(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_socks_proxy(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetSocksProxy sets the socks_proxy option for the socket
func SockSetSocksProxy(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_socks_proxy(unsafe.Pointer(s.zsockT), cV)
}
}
// SocksProxy returns the current value of the socket's socks_proxy option
func (s *Sock) SocksProxy() string {
val := C.zsock_socks_proxy(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SocksProxy returns the current value of the socket's socks_proxy option
func SocksProxy(s *Sock) string {
val := C.zsock_socks_proxy(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetXPubNodrop sets the xpub_nodrop option for the socket
func (s *Sock) SetXPubNodrop(val int) {
C.zsock_set_xpub_nodrop(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetXPubNodrop sets the xpub_nodrop option for the socket
func SockSetXPubNodrop(v int) SockOption {
return func(s *Sock) {
C.zsock_set_xpub_nodrop(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetTos sets the tos option for the socket
func (s *Sock) SetTos(val int) {
C.zsock_set_tos(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetTos sets the tos option for the socket
func SockSetTos(v int) SockOption {
return func(s *Sock) {
C.zsock_set_tos(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// Tos returns the current value of the socket's tos option
func (s *Sock) Tos() int {
val := C.zsock_tos(unsafe.Pointer(s.zsockT))
return int(val)
}
// Tos returns the current value of the socket's tos option
func Tos(s *Sock) int {
val := C.zsock_tos(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetRouterHandover sets the router_handover option for the socket
func (s *Sock) SetRouterHandover(val int) {
C.zsock_set_router_handover(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetRouterHandover sets the router_handover option for the socket
func SockSetRouterHandover(v int) SockOption {
return func(s *Sock) {
C.zsock_set_router_handover(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetRouterMandatory sets the router_mandatory option for the socket
func (s *Sock) SetRouterMandatory(val int) {
C.zsock_set_router_mandatory(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetRouterMandatory sets the router_mandatory option for the socket
func SockSetRouterMandatory(v int) SockOption {
return func(s *Sock) {
C.zsock_set_router_mandatory(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetProbeRouter sets the probe_router option for the socket
func (s *Sock) SetProbeRouter(val int) {
C.zsock_set_probe_router(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetProbeRouter sets the probe_router option for the socket
func SockSetProbeRouter(v int) SockOption {
return func(s *Sock) {
C.zsock_set_probe_router(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetReqRelaxed sets the req_relaxed option for the socket
func (s *Sock) SetReqRelaxed(val int) {
C.zsock_set_req_relaxed(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetReqRelaxed sets the req_relaxed option for the socket
func SockSetReqRelaxed(v int) SockOption {
return func(s *Sock) {
C.zsock_set_req_relaxed(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetReqCorrelate sets the req_correlate option for the socket
func (s *Sock) SetReqCorrelate(val int) {
C.zsock_set_req_correlate(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetReqCorrelate sets the req_correlate option for the socket
func SockSetReqCorrelate(v int) SockOption {
return func(s *Sock) {
C.zsock_set_req_correlate(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetConflate sets the conflate option for the socket
func (s *Sock) SetConflate(val int) {
C.zsock_set_conflate(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetConflate sets the conflate option for the socket
func SockSetConflate(v int) SockOption {
return func(s *Sock) {
C.zsock_set_conflate(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetZapDomain sets the zap_domain option for the socket
func (s *Sock) SetZapDomain(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_zap_domain(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetZapDomain sets the zap_domain option for the socket
func SockSetZapDomain(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_zap_domain(unsafe.Pointer(s.zsockT), cV)
}
}
// ZapDomain returns the current value of the socket's zap_domain option
func (s *Sock) ZapDomain() string {
val := C.zsock_zap_domain(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// ZapDomain returns the current value of the socket's zap_domain option
func ZapDomain(s *Sock) string {
val := C.zsock_zap_domain(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// Mechanism returns the current value of the socket's mechanism option
func (s *Sock) Mechanism() int {
val := C.zsock_mechanism(unsafe.Pointer(s.zsockT))
return int(val)
}
// Mechanism returns the current value of the socket's mechanism option
func Mechanism(s *Sock) int {
val := C.zsock_mechanism(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetPlainServer sets the plain_server option for the socket
func (s *Sock) SetPlainServer(val int) {
C.zsock_set_plain_server(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetPlainServer sets the plain_server option for the socket
func SockSetPlainServer(v int) SockOption {
return func(s *Sock) {
C.zsock_set_plain_server(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// PlainServer returns the current value of the socket's plain_server option
func (s *Sock) PlainServer() int {
val := C.zsock_plain_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// PlainServer returns the current value of the socket's plain_server option
func PlainServer(s *Sock) int {
val := C.zsock_plain_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetPlainUsername sets the plain_username option for the socket
func (s *Sock) SetPlainUsername(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_plain_username(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetPlainUsername sets the plain_username option for the socket
func SockSetPlainUsername(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_plain_username(unsafe.Pointer(s.zsockT), cV)
}
}
// PlainUsername returns the current value of the socket's plain_username option
func (s *Sock) PlainUsername() string {
val := C.zsock_plain_username(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// PlainUsername returns the current value of the socket's plain_username option
func PlainUsername(s *Sock) string {
val := C.zsock_plain_username(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetPlainPassword sets the plain_password option for the socket
func (s *Sock) SetPlainPassword(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_plain_password(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetPlainPassword sets the plain_password option for the socket
func SockSetPlainPassword(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_plain_password(unsafe.Pointer(s.zsockT), cV)
}
}
// PlainPassword returns the current value of the socket's plain_password option
func (s *Sock) PlainPassword() string {
val := C.zsock_plain_password(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// PlainPassword returns the current value of the socket's plain_password option
func PlainPassword(s *Sock) string {
val := C.zsock_plain_password(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetCurveServer sets the curve_server option for the socket
func (s *Sock) SetCurveServer(val int) {
C.zsock_set_curve_server(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetCurveServer sets the curve_server option for the socket
func SockSetCurveServer(v int) SockOption {
return func(s *Sock) {
C.zsock_set_curve_server(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// CurveServer returns the current value of the socket's curve_server option
func (s *Sock) CurveServer() int {
val := C.zsock_curve_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// CurveServer returns the current value of the socket's curve_server option
func CurveServer(s *Sock) int {
val := C.zsock_curve_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetCurvePublickey sets the curve_publickey option for the socket
func (s *Sock) SetCurvePublickey(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_curve_publickey(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetCurvePublickey sets the curve_publickey option for the socket
func SockSetCurvePublickey(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_curve_publickey(unsafe.Pointer(s.zsockT), cV)
}
}
// CurvePublickey returns the current value of the socket's curve_publickey option
func (s *Sock) CurvePublickey() string {
val := C.zsock_curve_publickey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// CurvePublickey returns the current value of the socket's curve_publickey option
func CurvePublickey(s *Sock) string {
val := C.zsock_curve_publickey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetCurveSecretkey sets the curve_secretkey option for the socket
func (s *Sock) SetCurveSecretkey(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_curve_secretkey(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetCurveSecretkey sets the curve_secretkey option for the socket
func SockSetCurveSecretkey(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_curve_secretkey(unsafe.Pointer(s.zsockT), cV)
}
}
// CurveSecretkey returns the current value of the socket's curve_secretkey option
func (s *Sock) CurveSecretkey() string {
val := C.zsock_curve_secretkey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// CurveSecretkey returns the current value of the socket's curve_secretkey option
func CurveSecretkey(s *Sock) string {
val := C.zsock_curve_secretkey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetCurveServerkey sets the curve_serverkey option for the socket
func (s *Sock) SetCurveServerkey(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_curve_serverkey(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetCurveServerkey sets the curve_serverkey option for the socket
func SockSetCurveServerkey(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_curve_serverkey(unsafe.Pointer(s.zsockT), cV)
}
}
// CurveServerkey returns the current value of the socket's curve_serverkey option
func (s *Sock) CurveServerkey() string {
val := C.zsock_curve_serverkey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// CurveServerkey returns the current value of the socket's curve_serverkey option
func CurveServerkey(s *Sock) string {
val := C.zsock_curve_serverkey(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetGssapiServer sets the gssapi_server option for the socket
func (s *Sock) SetGssapiServer(val int) {
C.zsock_set_gssapi_server(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetGssapiServer sets the gssapi_server option for the socket
func SockSetGssapiServer(v int) SockOption {
return func(s *Sock) {
C.zsock_set_gssapi_server(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// GssapiServer returns the current value of the socket's gssapi_server option
func (s *Sock) GssapiServer() int {
val := C.zsock_gssapi_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// GssapiServer returns the current value of the socket's gssapi_server option
func GssapiServer(s *Sock) int {
val := C.zsock_gssapi_server(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetGssapiPlaintext sets the gssapi_plaintext option for the socket
func (s *Sock) SetGssapiPlaintext(val int) {
C.zsock_set_gssapi_plaintext(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetGssapiPlaintext sets the gssapi_plaintext option for the socket
func SockSetGssapiPlaintext(v int) SockOption {
return func(s *Sock) {
C.zsock_set_gssapi_plaintext(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// GssapiPlaintext returns the current value of the socket's gssapi_plaintext option
func (s *Sock) GssapiPlaintext() int {
val := C.zsock_gssapi_plaintext(unsafe.Pointer(s.zsockT))
return int(val)
}
// GssapiPlaintext returns the current value of the socket's gssapi_plaintext option
func GssapiPlaintext(s *Sock) int {
val := C.zsock_gssapi_plaintext(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetGssapiPrincipal sets the gssapi_principal option for the socket
func (s *Sock) SetGssapiPrincipal(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_gssapi_principal(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetGssapiPrincipal sets the gssapi_principal option for the socket
func SockSetGssapiPrincipal(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_gssapi_principal(unsafe.Pointer(s.zsockT), cV)
}
}
// GssapiPrincipal returns the current value of the socket's gssapi_principal option
func (s *Sock) GssapiPrincipal() string {
val := C.zsock_gssapi_principal(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// GssapiPrincipal returns the current value of the socket's gssapi_principal option
func GssapiPrincipal(s *Sock) string {
val := C.zsock_gssapi_principal(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetGssapiServicePrincipal sets the gssapi_service_principal option for the socket
func (s *Sock) SetGssapiServicePrincipal(val string) {
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.zsock_set_gssapi_service_principal(unsafe.Pointer(s.zsockT), cVal)
}
// SockSetGssapiServicePrincipal sets the gssapi_service_principal option for the socket
func SockSetGssapiServicePrincipal(v string) SockOption {
return func(s *Sock) {
cV := C.CString(v)
defer C.free(unsafe.Pointer(cV))
C.zsock_set_gssapi_service_principal(unsafe.Pointer(s.zsockT), cV)
}
}
// GssapiServicePrincipal returns the current value of the socket's gssapi_service_principal option
func (s *Sock) GssapiServicePrincipal() string {
val := C.zsock_gssapi_service_principal(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// GssapiServicePrincipal returns the current value of the socket's gssapi_service_principal option
func GssapiServicePrincipal(s *Sock) string {
val := C.zsock_gssapi_service_principal(unsafe.Pointer(s.zsockT))
return C.GoString(val)
}
// SetIpv6 sets the ipv6 option for the socket
func (s *Sock) SetIpv6(val int) {
C.zsock_set_ipv6(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetIpv6 sets the ipv6 option for the socket
func SockSetIpv6(v int) SockOption {
return func(s *Sock) {
C.zsock_set_ipv6(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// Ipv6 returns the current value of the socket's ipv6 option
func (s *Sock) Ipv6() int {
val := C.zsock_ipv6(unsafe.Pointer(s.zsockT))
return int(val)
}
// Ipv6 returns the current value of the socket's ipv6 option
func Ipv6(s *Sock) int {
val := C.zsock_ipv6(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetImmediate sets the immediate option for the socket
func (s *Sock) SetImmediate(val int) {
C.zsock_set_immediate(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetImmediate sets the immediate option for the socket
func SockSetImmediate(v int) SockOption {
return func(s *Sock) {
C.zsock_set_immediate(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// Immediate returns the current value of the socket's immediate option
func (s *Sock) Immediate() int {
val := C.zsock_immediate(unsafe.Pointer(s.zsockT))
return int(val)
}
// Immediate returns the current value of the socket's immediate option
func Immediate(s *Sock) int {
val := C.zsock_immediate(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetRouterRaw sets the router_raw option for the socket
func (s *Sock) SetRouterRaw(val int) {
C.zsock_set_router_raw(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetRouterRaw sets the router_raw option for the socket
func SockSetRouterRaw(v int) SockOption {
return func(s *Sock) {
C.zsock_set_router_raw(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// SetIpv4only sets the ipv4only option for the socket
func (s *Sock) SetIpv4only(val int) {
C.zsock_set_ipv4only(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetIpv4only sets the ipv4only option for the socket
func SockSetIpv4only(v int) SockOption {
return func(s *Sock) {
C.zsock_set_ipv4only(unsafe.Pointer(s.zsockT), C.int(v))
}
}
// Ipv4only returns the current value of the socket's ipv4only option
func (s *Sock) Ipv4only() int {
val := C.zsock_ipv4only(unsafe.Pointer(s.zsockT))
return int(val)
}
// Ipv4only returns the current value of the socket's ipv4only option
func Ipv4only(s *Sock) int {
val := C.zsock_ipv4only(unsafe.Pointer(s.zsockT))
return int(val)
}
// SetDelayAttachOnConnect sets the delay_attach_on_connect option for the socket
func (s *Sock) SetDelayAttachOnConnect(val int) {
C.zsock_set_delay_attach_on_connect(unsafe.Pointer(s.zsockT), C.int(val))
}
// SockSetDelayAttachOnConnect sets the delay_attach_on_connect option for the socket
func SockSetDelayAttachOnConnect(v int) SockOption {
return func(s *Sock) {
C.zsock_set_delay_attach_on_connect(unsafe.Pointer(s.zsockT), C.int(v))
}
}