(self, message, session=None, upn=None)
Sends the given *message* to the client using the `go:user_message`
        WebSocket action at the currently-connected client.

        If *upn* is provided the *message* will be sent to all users with a
        matching 'upn' value.

        If *session* is provided the message will be sent to all users with a
        matching session ID.  This is useful in situations where all users share
        the same 'upn' (i.e. ANONYMOUS).

        if *upn* is 'AUTHENTICATED' all users will get the message.
Sends the given *message* to the client using the `go:user_message`
        WebSocket action at the currently-connected client.
Sends the given * message * to the client using the go : user_message WebSocket action at the currently - connected client .
def send_message(self, message, session=None, upn=None):
        """
        Sends the given *message* to the client using the `go:user_message`
        WebSocket action at the currently-connected client.

        If *upn* is provided the *message* will be sent to all users with a
        matching 'upn' value.

        If *session* is provided the message will be sent to all users with a
        matching session ID.  This is useful in situations where all users share
        the same 'upn' (i.e. ANONYMOUS).

        if *upn* is 'AUTHENTICATED' all users will get the message.
        """
        message_dict = {'go:user_message': message}
        if upn:
            ApplicationWebSocket._deliver(message_dict, upn=upn)
        elif session:
            ApplicationWebSocket._deliver(message_dict, session=session)
        else: # Just send to the currently-connected client
            self.write_message(message_dict)
        self.trigger('go:send_message', message, upn, session)
def send_message ( self , message , session = None , upn = None ) : message_dict = { 'go:user_message' : message } if upn : ApplicationWebSocket . _deliver ( message_dict , upn = upn ) elif session : ApplicationWebSocket . _deliver ( message_dict , session = session ) else : # Just send to the currently-connected client self . write_message ( message_dict ) self . trigger ( 'go:send_message' , message , upn , session )