CrossPlatform GUI Programming with wxWidgets [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

CrossPlatform GUI Programming with wxWidgets [Electronic resources] - نسخه متنی

Julian Smart; Kevin Hock; Stefan Csomor

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید











  • Socket Classes and Functionality Overview


    At the core of socket operations is wxSocketBase, which provides the basic socket functionality for sending and receiving data, closing, error reporting, and so on. Establishing a listening socket or connecting to a server requires wxSocketServer or wxSocketClient, respectively. wxSocketEvent is used to notify the application of an event that has occurred on a socket. The abstract class wxSocketBase and its children such as wxIPV4address enable you to specify remote hosts and ports. Lastly, stream classes such as wxSocketInputStream and wxSocketOutputStream can be coupled with other streams to move and transform data over a socket. Streams were discussed in Chapter 14, "Files and Streams."Socket Flags" section. The traditional threaded socket approach is handled by disabling the socket events and using blocking socket calls. On the other hand, you can enable socket events and eliminate the need for a separate thread; wxWidgets will send an event to your application when processing is required on a socket. By letting the data arrive in the background and processing data only when it is present, you avoid blocking the GUI, and you avoid the complexity of putting each socket in its own thread.

    This chapter provides examples of both methods as well as a thorough explanation of the API for wxSocket and related classes. The examples and reference can be read and used independently, although the examples are intended to preface the explanation of the APIs.

  • / 261