Practical Programming in Tcl and Tk (4th Edition)

   

Practical Programming in Tcl & Tk, Third Edition

By Brent B. Welch

Table of Contents
Chapter 49.  Tcl 7.5/Tk 4.1

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 fconfigure command is described on page 221.


       
    Top
     

    Категории