[call [cmd "udp_conf"] [arg "sock"] [arg "host"] [arg "port"]]
+[emph Deprecated] in favour of the standard Tcl [cmd fconfigure] command.
+[nl]
[cmd udp_conf] in this configuration is used to specify the remote destination
for packets written to this [arg "sock"]. You must call this command before
writing data to the UDP socket.
[call [cmd "udp_conf"] [arg "sock"] [arg [opt -myport]] [arg [opt -remote]] [arg [opt -peer]] [arg [opt "-broadcast bool"]] [arg [opt "-ttl count"]]]
+[emph Deprecated] in favour of the standard Tcl [cmd fconfigure] command.
+[nl]
In addition to being used to configure the remote host, the [cmd "udp_conf"]
command is used to obtain information about the UDP socket.
} else if (argc == 4) {
if (!strcmp(argv[2], "-mcastadd")) {
- r = UdpMulticast(statePtr, interp, argv[3], IP_ADD_MEMBERSHIP);
+ r = UdpMulticast((ClientData)statePtr, interp, argv[3], IP_ADD_MEMBERSHIP);
} else if (!strcmp(argv[2], "-mcastdrop")) {
- r = UdpMulticast(statePtr, interp, argv[3], IP_DROP_MEMBERSHIP);
+ r = UdpMulticast((ClientData)statePtr, interp, argv[3], IP_DROP_MEMBERSHIP);
} else if (!strcmp(argv[2], "-broadcast")) {
int n = 0;
Tcl_ListObjGetElements(interp, statePtr->groupsObj, &objc, &objv);
for (n = 0; n < objc; n++) {
- UdpMulticast(statePtr, interp,
+ UdpMulticast((ClientData)statePtr, interp,
Tcl_GetString(objv[n]), IP_DROP_MEMBERSHIP);
}
Tcl_DecrRefCount(statePtr->groupsObj);
CONST84 char *optionName, Tcl_DString *optionValue)
{
UdpState *statePtr = (UdpState *)instanceData;
- const char * options[] = { "myport", "remote", "peer", "mcastgroups", "broadcast", "ttl", NULL};
+ CONST84 char * options[] = { "myport", "remote", "peer", "mcastgroups", "broadcast", "ttl", NULL};
int r = TCL_OK;
if (optionName == NULL) {
set ::tcltest::testsDirectory [file dir [info script]]
# We need to ensure that the testsDirectory is absolute
-::tcltest::normalizePath ::tcltest::testsDirectory
+if {[catch {::tcltest::normalizePath ::tcltest::testsDirectory}]} {
+ # The version of tcltest we have here does not support
+ # 'normalizePath', so we have to do this on our own.
+
+ set oldpwd [pwd]
+ catch {cd $::tcltest::testsDirectory}
+ set ::tcltest::testsDirectory [pwd]
+ cd $oldpwd
+}
set chan $::tcltest::outputChannel