GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
message_target(3) Arcan Lua API message_target(3)

message_target - send a utf-8 coded text message to a frameserver

bytes_left
message_target( tgtvid, msg )

In some rare occasions (custom applications and clipboard not using bchunk- method of transfer) it makes sense to send short custom text messages to a target frameserver. This function takes a string, valides it as utf-8 and breaks it down to event- sized chunks and adds to the target frameserver incoming eventqueue. The function returns 0 if the entire message was sent, a negative value if the string failed to validate or a positive number indicating the number of bytes left. The latter case only occurs if the target event queue is full.

function message_target0()
      target_alloc("test", function(source, status)
            if (status.kind == "connected") then
                  message_target(source, "welcome");
                  return shutdown();
            end
      end);
end

target_input(3)

June 2022 targetcontrol

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.