class_docstr: The ZMQ socket object
  
  To create a Socket, first create a Context::
  
      ctx = zmq.Context.instance()
  
  then call ``ctx.socket(socket_type)``::
  
      s = ctx.socket(zmq.ROUTER)
class_docstr_tok: ["The","ZMQ","socket","object","To","create","a","Socket",",","first","create","a","Context",":",":","ctx","=","zmq.Context.instance","(",")","then","call","``","ctx.socket","(","socket_type",")","``",":",":","s","=","ctx.socket","(","zmq.ROUTER",")"]
docstr: Send a Python unicode string as a message with an encoding.
  
  0MQ communicates with raw bytes, so you must encode/decode
  text (unicode on py2, str on py3) around 0MQ.
  
  Parameters
  ----------
  u : Python unicode string (unicode on py2, str on py3)
      The unicode string to send.
  flags : int, optional
      Any valid flags for :func:`Socket.send`.
  encoding : str [default: 'utf-8']
      The encoding to be used
docstr_tok: ["Send","a","Python","unicode","string","as","a","message","with","an","encoding",".","0MQ","communicates","with","raw","bytes",",","so","you","must","encode\/decode","text","(","unicode","on","py2",",","str","on","py3",")","around","0MQ",".","Parameters","--","--","--","--","--","u",":","Python","unicode","string","(","unicode","on","py2",",","str","on","py3",")","The","unicode","string","to","send",".","flags",":","int",",","optional","Any","valid","flags","for",":","func",":","`","Socket.send","`",".","encoding",":","str","[","default",":","'utf-8","'","]","The","encoding","to","be","used"]
code: def send_string(
      self, u, flags=0, copy=True, encoding="utf-8", **kwargs
  ):
      """Send a Python unicode string as a message with an encoding.
  
      0MQ communicates with raw bytes, so you must encode/decode
      text (unicode on py2, str on py3) around 0MQ.
  
      Parameters
      ----------
      u : Python unicode string (unicode on py2, str on py3)
          The unicode string to send.
      flags : int, optional
          Any valid flags for :func:`Socket.send`.
      encoding : str [default: 'utf-8']
          The encoding to be used
      """
      if not isinstance(u, basestring):
          raise TypeError("unicode/str objects only")
      return self.send(
          u.encode(encoding), flags=flags, copy=copy, **kwargs
      )
  
imports: import errno
  import random
  import sys
  import warnings
  import zmq
  from zmq.backend import Socket
  from .poll import Poller
  from .None import constants
  from .attrsettr import AttributeSetter
  from zmq.error import ZMQError, ZMQBindError
  from zmq.utils import jsonapi
  from zmq.utils.strtypes import bytes, unicode, basestring
  from .constants import SNDMORE, ENOTSUP, POLLIN, int64_sockopt_names, int_sockopt_names, bytes_sockopt_names, fd_sockopt_names
label_desc: Use image node_id 25 for calling the Socket obj's underlying member method code with example usage: obj.send_string(u, flags, copy, encoding) and returns: self