O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Network Sockets

The socket command provides access to TCP/IP sockets. There are C APIs to define new channels, and there are extensions that provide UDP and other protocols. Chapter 17 describes sockets starting on page 228. Example 40-4 on page 567 uses sockets as a replacement for the Tk send command.

info hostname

The info hostname command was added to find out your host identifier.

The fconfigure Command

The best way to use sockets is with event-driven I/O. The fileevent command provides part of the solution. You also need to be able to control the blocking behavior and buffering modes of sockets. The fconfigure command lets you do this, and more. You can also control the newline translation modes and query socket-specific settings. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required