Transport implementation
558287
function ironmqGet(path, params, cb) {

    var search = qs.stringify(params)
    search = search ? ('?' + search) : ''

    request.get({ url     : baseUrl + path + search
                , headers : headers}
              , parseResponse(cb))
      .end()
  }
981464
public static function add_transport($transport) {
		if (empty(self::$transports)) {
			self::$transports = array(
				'Requests_Transport_cURL',
				'Requests_Transport_fsockopen',
			);
		}

		self::$transports = array_merge(self::$transports, array($transport));
	}
11931
function init(trans) {
            // Assign `trans` to `transport` which is associated with the
            // socket.
            transport = trans;
            // When the transport has received a message from the server.
            transport.on("text", function(text) {
                // Converts JSON text to an event object.
                // 
                // It should have the following properties:
                // * `id: string`: an event identifier.
                // * `type: string`: an event type.
                // * `data: any`: an event data.
                // * `reply: boolean`: true if this event requires the reply.
                var event = JSON.parse(text);
                // If the server sends a plain event, dispatch it.
                if (!event.reply) {
                    self.emit(event.type, event.data);
                } else {
                    var latch;
                    // A function to create a function.
                    function reply(success) {
                        // A controller function.
                        return function(value) {
                            // The latch prevents double reply.
                            if (!latch) {
                                latch = true;
                                self.send("reply", {id: event.id, data: value, exception: !success});
                            }
                        };
                    }
                    // Here, the controller is passed to the handler as 2nd
                    // argument and calls the server's `resolved` or `rejected`
                    // callback by sending `reply` event.
                    self.emit(event.type, event.data, {resolve: reply(true), reject: reply(false)});
                }
            });
            // When any error has occurred.
            transport.on("error", function(error) {
                self.emit("error", error);
            });
            // When the transport has been closed for any reason.
            transport.on("close", function() {
                self.emit("close");
            });
        }
157938
public function addTransport(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Transport\Transport $transport)
    {
        $this->transports[] = $transport;

        return $this;
    }
498186
public void addNavButtons()
    {
        BaseApplication application = (BaseApplication)this.getTask().getApplication();
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MenuConstants.GRID, MessageProcessInfo.TRANSPORT_DETAIL_SCREEN, application.getResources(ResourceConstants.PRODUCT_RESOURCE, true).getString(MessageProcessInfo.TRANSPORT_DETAIL_SCREEN));
        super.addNavButtons();  // Next buttons will be "First!"
    }
1283738
def request(self, action, data={}, headers={}, method='GET'):
        
        data = self.merge(data, {'user': self.username, 'password': self.password, 'api_id': self.apiId})
        return Transport.request(self, action, data, headers, method)
143106
def start_transport(self):
        """"""
        if self.transport:
            if self.transport.connect():
                self.log.debug("Service successfully connected to transport layer")
            else:
                raise RuntimeError("Service could not connect to transport layer")
            # direct all transport callbacks into the main queue
            self._transport_interceptor_counter = itertools.count()
            self.transport.subscription_callback_set_intercept(
                self._transport_interceptor
            )
        else:
            self.log.debug("No transport layer defined for service. Skipping.")
337777
def connection_made(self, transport):
        
        self.transport = transport
        self.transport.sendto(self.message)
        self.transport.close()
101276
def connection_made(self, transport):
        """"""
        super().connection_made(transport)
        if hasattr(self.transport, 'serial'):
            _LOGGER.info('Connected to %s', self.transport.serial)
        else:
            _LOGGER.info('Connected to %s', self.transport)
647667
function (options) {

            if (typeof options === 'object') {

                // Add implementation-specific method prefix (dashboard or app)
                options.name = this.prefix + '.' + options.name;
                return this.transport.send(options);
            }  else {
                throw new Error('Transport options must be an object.');
            }
        }
1252711
private function defineCoreRouting ()
    {
        $this->get("/",                    "controller.core:indexAction")->bind("index");
        $this->get("/all/{elementType}",   "controller.core:elementsOverviewAction")->bind("elements_overview");
        $this->get("/{elementType}/{key}", "controller.core:showElementAction")->bind("element");
    }
1318129
def _setup_transport(self):
        """"""
        if hasattr(self, 'sslopts'):
            self.sock = ssl.wrap_socket(self.sock, **self.sslopts)
        elif hasattr(self, 'sslctx'):
            self.sock = self.sslctx.wrap_socket(self.sock,
                                                server_hostname=self.hostname)
        else:
            self.sock = ssl.wrap_socket(self.sock)
        self.sock.do_handshake()
        self._quick_recv = self.sock.read
461471
public function register()
    {
        $this->app->afterResolving(TransportManager::class, function(TransportManager $manager) {
            $this->extendTransportManager($manager);
        });
    }
1221113
def add(self, vehID, routeID, depart=tc.DEPARTFLAG_NOW, pos=0, speed=0,
            lane=tc.DEPARTFLAG_LANE_FIRST_ALLOWED, typeID="DEFAULT_VEHTYPE"):
        
        self._connection._beginMessage(tc.CMD_SET_VEHICLE_VARIABLE, tc.ADD, vehID,
                                       1 + 4 + 1 + 4 + len(typeID) + 1 + 4 + len(routeID) + 1 + 4 + 1 + 8 + 1 + 8 + 1 + 1)
        if depart > 0:
            depart *= 1000
        self._connection._string += struct.pack("!Bi", tc.TYPE_COMPOUND, 6)
        self._connection._packString(typeID)
        self._connection._packString(routeID)
        self._connection._string += struct.pack("!Bi", tc.TYPE_INTEGER, depart)
        self._connection._string += struct.pack("!BdBd",
                                                tc.TYPE_DOUBLE, pos, tc.TYPE_DOUBLE, speed)
        self._connection._string += struct.pack("!Bb", tc.TYPE_BYTE, lane)
        self._connection._sendExact()
1341269
private void checkTransport() throws WorkException
   {
      if (!transport.isInitialized())
      {
         try
         {
            transport.initialize();
            initialize();
         }
         catch (Throwable t)
         {
            WorkException we = new WorkException("Exception during transport initialization");
            we.initCause(t);
            throw we;
         }
      }
   }
1038598
@SuppressWarnings("unchecked")
	public void registerTransport(String transportClazz) {
		if(transportClazz == null){
			return;
		}
		try {
			registerTransport((Class<Transport>)Class.forName(transportClazz));
		} catch (ClassNotFoundException e) {
			return;
		} catch(ClassCastException cce){
			throw new ApiTransportException(cce);
		}
	}
986192
function addResults(transport, next) {
        queryTransport(transport, function (err, result) {
            //
            // queryTransport could potentially invoke the callback
            // multiple times since Transport code can be unpredictable.
            //
            if (next) {
                result = err || result;
                if (result) {
                    results[transport.name] = result;
                }

                next();
            }

            next = null;
        });
    }