Lines Matching refs:pss
26 * Unlike ws, http is a stateless protocol. This pss only exists for the
30 struct pss {
53 struct pss *pss = (struct pss *)data;
58 lws_strncpy(pss->filename, filename, sizeof(pss->filename) - 1);
60 lws_filename_purify_inplace(pss->filename);
62 pss->fd = lws_open(pss->filename, O_CREAT | O_TRUNC | O_RDWR, 0600);
63 if (pss->fd == -1) {
65 pss->filename);
74 pss->file_length += (unsigned int)len;
76 n = (int)write(pss->fd, buf, (unsigned int)len);
88 pss->file_length, pss->filename);
90 close(pss->fd);
91 pss->fd = -1;
106 struct pss *pss = (struct pss *)user;
131 if (!pss->spa) {
132 pss->spa = lws_spa_create(wsi, param_names,
134 file_upload_cb, pss);
135 if (!pss->spa)
141 if (lws_spa_process(pss->spa, in, (int)len))
149 lws_spa_finalize(pss->spa);
154 if (!lws_spa_get_string(pss->spa, n))
159 lws_spa_get_length(pss->spa, n),
160 lws_spa_get_string(pss->spa, n));
177 if (pss->spa) {
178 lws_spa_destroy(pss->spa);
179 pss->spa = NULL;
191 { "http", callback_http, sizeof(struct pss), 0, 0, NULL, 0 },